Commit Graph

2132 Commits

Author SHA1 Message Date
mykonos-ibiza 53fb20aa6a refactor(api): update import statements to use relative paths
- Changed import statements in `agents.py` and `threads.py` to utilize relative paths for improved module organization and clarity.
2025-07-29 21:15:28 +05:30
mykonos-ibiza 8a6f23080e refactor(kortix): reorganize imports and introduce new Kortix class
- Updated import statements to use relative paths for better module resolution.
- Deleted the empty `api` and `kortix` directories to clean up the structure.
- Introduced the `Kortix` class to manage agents and threads, enhancing the SDK's core functionality.
2025-07-29 21:11:50 +05:30
mykonos-ibiza 01c0178531 fix(api): update allowed methods in CORS middleware to include PATCH
- Modified the CORS middleware configuration to support the PATCH method, enhancing API flexibility for client requests.
2025-07-29 19:43:32 +05:30
mykonos-ibiza 8869138a7e feat(api-keys): implement API key management system
- Added a new API keys service with endpoints for creating, listing, revoking, and deleting API keys.
- Integrated API key validation and caching for performance.
- Updated backend configuration to include API key secret and throttling settings.
- Created frontend components for managing API keys, including a user interface for creating and displaying keys.
- Introduced a new database migration for the API keys table with necessary constraints and security policies.
- Enhanced authentication methods to support API key usage alongside JWT.
2025-07-29 19:38:37 +05:30
marko-kraemer 0063d72f2a wip 2025-07-29 14:45:21 +02:00
marko-kraemer b876a4007f wip 2025-07-29 14:33:32 +02:00
Marko Kraemer e7ad67caef
Merge pull request #1116 from dat-lequoc/ai-iteration-20250728-231518
Morph AI Edit_file, better prompting ; Update UI as well, but need more check on frontend
2025-07-29 13:00:44 +02:00
mykonos-ibiza e3cd8c066f feat(kortix): add local key-value store and enhance weather tool functionality
- Introduced a new local key-value store configuration file to manage agent and thread IDs.
- Updated the weather retrieval tool to return a different weather condition.
- Integrated a real-time stream processor for improved message handling and status updates in the main function.
2025-07-29 14:33:37 +05:30
mykonos-ibiza 7050490d03 feat(api): enhance thread creation and agent functionality
- Updated the `create_thread` endpoint to set a default name if none is provided.
- Modified the `Agent` class to use a dictionary for `agentpress_tools` instead of a custom type.
- Improved the `LocalKVStore` initialization to use a hidden filename.
- Added a new weather retrieval tool to the MCP.
- Updated agent and thread setup in the main function for better clarity and functionality.
- Refactored message handling in the `ThreadsClient` to use query parameters for message posting.
2025-07-29 14:23:12 +05:30
Saumya 46a028ed61 cleanup 2025-07-29 12:45:20 +05:30
mykonos-ibiza 307a9a80ae Merge branch 'main' into kortix-sdk 2025-07-29 12:20:11 +05:30
mykonos-ibiza f45d106d39 feat(kortix): implement core functionality for agent and thread management
- Introduced the `Kortix` class to manage agents and threads with API integration.
- Enhanced the `Agent` class to support running agents with prompts and managing threads.
- Added streaming capabilities for real-time message processing.
- Created example scripts for testing agent functionality and stream processing.
- Updated models and tools to improve integration and usability.
2025-07-29 12:13:25 +05:30
Bobbie 5e02569639
Merge pull request #1118 from escapade-mckv/refactor-backend-2
refactor & cleanup templates
2025-07-29 11:26:15 +05:30
Saumya 488d184939 refactor & cleanup templates 2025-07-29 11:25:18 +05:30
yeyan1996 4c34f99b95 fix: correct JSON formatting in streamAgent for message type checks 2025-07-28 20:47:47 -07:00
LE Quoc Dat 1211eefbdd more guide, and edit_tool grind preference 2025-07-28 23:47:08 +02:00
LE Quoc Dat c8c71b5936 AI: the AI can't still use the AI edit tool correctly. we should update the prompt a bit, and also make the better example :
the authenticate_user; pls add something in the top like import, so we can do like this :
"""
// ... existing imports ...
import something
// ... existing code ...
<auth func() ... >
// ... existing code
"""

add another example on top of it : todo list ; where we show it's convinient for checking some scattered todo box .
2025-07-28 23:17:37 +02:00
LE Quoc Dat 37f3fb866d AI: there're duplication of columns when it comes to unified diff UI.
also in unified diff, you don't need to show the removed line (red). Green is like concise enough to show the change,
2025-07-28 22:48:57 +02:00
Vukasin 6148b199ae feat: wip workflow design 2025-07-28 22:44:31 +02:00
LE Quoc Dat 120825d3f1 AI:
0.910 > suna@0.1.0 build
0.910 > next build
0.910
1.845    ▲ Next.js 15.3.3
1.845    - Environments: .env.local
1.846
1.871    Creating an optimized production build ...
43.91 Failed to compile.
43.91
43.91 ./src/components/thread/tool-views/file-operation/_utils.ts
43.91 Module parse failed: Identifier 'parseContent' has already been declared (243:6)
43.91 File was processed with these loaders:
43.91  * ./node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js
43.91  * ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
43.91 You may need an additional loader to handle the result of these loaders.
43.91 |     };
43.91 | };
43.91 > const parseContent = (content)=>{
43.91 |     if (typeof content === 'string') {
43.91 |         try {
43.91
43.91 Import trace for requested module:
43.91 ./src/components/thread/tool-views/file-operation/_utils.ts
43.91 ./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
43.91 ./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
43.91 ./src/components/thread/tool-views/wrapper/index.ts
43.91 ./src/components/thread/tool-call-side-panel.tsx
43.91 ./src/app/share/[threadId]/page.tsx
43.91
43.91
43.91 > Build failed because of webpack errors
43.95 npm notice
43.95 npm notice New major version of npm available! 10.9.2 -> 11.5.1
43.95 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.5.1
43.95 npm notice To update run: npm install -g npm@11.5.1
43.95 npm notice
------
Dockerfile:45
2025-07-28 22:36:13 +02:00
LE Quoc Dat ef980353ba AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:22:38 +02:00
LE Quoc Dat d4619f0744 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:19:34 +02:00
LE Quoc Dat fe1e1c6fb4 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:16:20 +02:00
LE Quoc Dat 7ef8a624be AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:12:46 +02:00
LE Quoc Dat 066a43d951 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:09:32 +02:00
LE Quoc Dat 0215b81b09 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:06:04 +02:00
LE Quoc Dat 86aaa9e5ca AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 22:02:07 +02:00
LE Quoc Dat 1fbac3bc15 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:59:07 +02:00
LE Quoc Dat cb424d8fe7 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:55:45 +02:00
LE Quoc Dat 4a19e1e521 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:52:15 +02:00
LE Quoc Dat 66194d03d3 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:49:32 +02:00
LE Quoc Dat 2def96efc9 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:46:31 +02:00
LE Quoc Dat a2eac10d87 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:42:25 +02:00
LE Quoc Dat deb442cbf7 AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit

Could not extract the file changes from the tool result."""

Check the state of code base and make to sure implement fully
2025-07-28 21:40:07 +02:00
LE Quoc Dat d6f3800076 AI:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx:41:11
Type error: Object literal may only specify known properties, and 'color' does not exist in type 'ReactDiffViewerStylesVariables'.

  39 |       variables: {
  40 |         dark: {
> 41 |           color: '#e2e8f0',
     |           ^
  42 |           background: '#09090b',
  43 |           addedBackground: '#104a32',
  44 |           addedColor: '#6ee7b7',
Next.js build worker exited with code: 1 and signal: null
2025-07-28 21:15:33 +02:00
LE Quoc Dat 96e77cfcbf AI:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx:41:11
Type error: Object literal may only specify known properties, and 'color' does not exist in type 'ReactDiffViewerStylesVariables'.

  39 |       variables: {
  40 |         dark: {
> 41 |           color: '#e2e8f0',
     |           ^
  42 |           background: '#09090b',
  43 |           addedBackground: '#104a32',
  44 |           addedColor: '#6ee7b7',
Next.js build worker exited with code: 1 and signal: null
2025-07-28 21:13:37 +02:00
mykonos-ibiza 57aa08fdaa feat(sdk): restructure SDK into new directory with updated API and models
- Moved existing components to a new `sdk` directory for better organization.
- Introduced new API structure for agent and thread management.
- Added models for tools and messages to enhance functionality.
- Implemented a local key-value store for persistent data management.
- Updated README and project files to reflect new structure and usage.
2025-07-29 00:41:33 +05:30
LE Quoc Dat ce0e35c4e5 AI:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'generateLineDiff' is not exported from './_utils' (imported as 'generateLineDiff').

Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx

./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'calculateDiffStats' is not exported from './_utils' (imported as 'calculateDiffStats').

Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx

 ⚠ Compiled with warnings in 40.0s

./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'generateLineDiff' is not exported from './_utils' (imported as 'generateLineDiff').

Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx

./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'calculateDiffStats' is not exported from './_utils' (imported as 'calculateDiffStats').

Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx
2025-07-28 21:10:59 +02:00
LE Quoc Dat 9a0dc4e200 AI: can we streamline the edit-file just like the create_file tool, in the front end ?
like stream the code-edit output of the agent; Then we should be able to show the diff as well, when the tool complete. We get the original file content, and the full updated code (output of morph) and some how send it to the front end.

the front end should show this properly , concisely so user can see the changes in green / red.

This shouldn't change the content feed to the model btw. Like it will pollute the context.

make a plan what to do first, not make changes yet
2025-07-28 20:46:21 +02:00
LE Quoc Dat 2608ad2ef1 prompting 2025-07-28 19:40:18 +02:00
marko-kraemer 696dd3722f wip 2025-07-28 19:25:52 +02:00
LE Quoc Dat 1d9bcbd202 AI: we need instruct the agent to Always use edit_tool. it doesn't do this for now. Like it prefer str_replace 2025-07-28 18:46:41 +02:00
Bobbie 5c21cf6276
Merge pull request #1114 from escapade-mckv/refactor-backend-2
refactor credentials codebase
2025-07-28 22:07:00 +05:30
Saumya e4d24d9038 refactor credentials codebase 2025-07-28 22:06:07 +05:30
LE Quoc Dat 1eff96929a AI: the edit tool is very good now, we need to make the model uses more this tool.
We still keep the tool itself, but in the prompt, we remove the need of writing str_replace and full rewrite, in the example, or prompt. because they will have the tools context as well. you understand ?
2025-07-28 18:24:29 +02:00
LE Quoc Dat 6b93e911d5 fix morph tool 2025-07-28 18:09:22 +02:00
LE Quoc Dat e4d7ffe066 npm i 2025-07-28 18:07:58 +02:00
marko-kraemer bb60569193 wip 2025-07-28 16:38:53 +02:00
Bobbie c98258eef3
Merge pull request #1112 from escapade-mckv/refactor-backend-2
fix trigger import error
2025-07-28 18:06:50 +05:30
Saumya 46010875d8 fix trigger import error 2025-07-28 18:05:59 +05:30