Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial agent deploy changes #1368

Closed
wants to merge 349 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
349 commits
Select commit Hold shift + click to select a range
b4e59bf
Turn off node genesis animation for now
parzival418 Sep 26, 2023
c03a8f2
Add new side menu to layout
parzival418 Sep 26, 2023
c75f6dd
Move new menu into file drawer
parzival418 Sep 26, 2023
68115a8
Make Magick global in Router
parzival418 Sep 26, 2023
4d4ae4b
Refactor tabs to extract main layout from provider
parzival418 Sep 26, 2023
fb39420
Add a global layout provider
parzival418 Sep 26, 2023
6f92735
Add basic file drawer
parzival418 Sep 27, 2023
65c83a1
Fix MUI errors on menu rendering
parzival418 Sep 27, 2023
78e7ad1
Hook up tree provider and fix up sidebar more
parzival418 Sep 27, 2023
9fa5c4e
Fix agents links
parzival418 Sep 27, 2023
a764552
Hook up open close keyhandler for file drawer
parzival418 Sep 27, 2023
39a2baa
Main workspace windows now rendered in tab
parzival418 Sep 27, 2023
d863543
Turn off console drawer for now.
parzival418 Sep 27, 2023
bdc05f1
Move state into client folder
parzival418 Sep 27, 2023
90d8ee7
Move layouts package
parzival418 Sep 27, 2023
7fe5da0
Move editor package into client folder
parzival418 Sep 27, 2023
01995a6
Move cloud agent manager
parzival418 Sep 27, 2023
ad5afa2
Move cloud agent worker to server folder
parzival418 Sep 27, 2023
1435f03
Move agents into server folder
parzival418 Sep 27, 2023
ac6c445
move magick chatbox into client folder
parzival418 Sep 27, 2023
2f45d11
Move redis pubsub package into server folder
parzival418 Sep 27, 2023
f104341
Move rete into shared folder
parzival418 Sep 27, 2023
06a4599
Move config into shared folder
parzival418 Sep 27, 2023
6b1461c
Move core client into client core folder
parzival418 Sep 27, 2023
63af5f8
Move core shared into shared core folder
parzival418 Sep 27, 2023
027216b
Create empty providers package
parzival418 Sep 27, 2023
5a74aa9
Remove wrong providers path
parzival418 Sep 27, 2023
4ef3bae
Properly generate providers package
parzival418 Sep 27, 2023
6f44437
Fix references to client core providers being moved
parzival418 Sep 27, 2023
5cd42fe
Fix more paths
parzival418 Sep 27, 2023
5ceeb31
Fix breaking circular dependency
parzival418 Sep 28, 2023
4ef72a5
Fix ees lint errors and more circular dependencies
parzival418 Sep 28, 2023
267efb2
More fixes
parzival418 Sep 28, 2023
ef5795c
Last fixes to get us back to building
parzival418 Sep 28, 2023
9cd970a
Move menu bar into right of tabs
parzival418 Sep 28, 2023
684b8f6
Add drawer animation hook
parzival418 Sep 29, 2023
9c97c23
Add global dockview override
parzival418 Sep 29, 2023
a30c266
Dockview css
parzival418 Sep 29, 2023
6f6b849
Update global layout provider
parzival418 Sep 29, 2023
1180d2e
Use animation hook in file drawer
parzival418 Sep 29, 2023
27357a4
Right sidebar panel
parzival418 Sep 29, 2023
9ff8b5f
Add right sidebar into global layout
parzival418 Sep 29, 2023
ff87dc6
Turn off global keyboard handler for toggling file drawer
parzival418 Sep 29, 2023
6f1f60e
Add global dockview theme variable
parzival418 Sep 29, 2023
c2b8cd4
Switch top using usevisible for panel control
parzival418 Oct 2, 2023
2993a0c
Add styling and themeing for layout
parzival418 Oct 2, 2023
637465f
Move new UI package into client folder
parzival418 Oct 4, 2023
20b329f
Fix some issues moving ui folder
parzival418 Oct 4, 2023
c8f4839
Upgrade to dockview preview
parzival418 Oct 6, 2023
c3bf7f4
Add basic drag and drop window buttons
parzival418 Oct 6, 2023
33ee63e
Fixed some naming
parzival418 Oct 6, 2023
430e2d9
Start agent rtk query service
parzival418 Oct 6, 2023
32a1b03
Remove links from menu to window opening
parzival418 Oct 6, 2023
7ebff1e
Start migrating file drawer into smaller components
parzival418 Oct 6, 2023
f3f2f67
More refactoring in sidebar
parzival418 Oct 6, 2023
a775664
Fix component map naming bug
parzival418 Oct 6, 2023
4f7b0fd
Compentize context menu
parzival418 Oct 6, 2023
6a4b55d
Better exports from state api
parzival418 Oct 6, 2023
6de3a0e
More refactoring of file menu
parzival418 Oct 6, 2023
ac6a5d9
Add project id into params on all rtk query requests
parzival418 Oct 7, 2023
be2d470
Work on rtk updateAgents method
parzival418 Oct 7, 2023
602f082
Properly authenticate projectid :(
parzival418 Oct 7, 2023
47c9542
Rip out a bunch of stuff from agent menu
parzival418 Oct 7, 2023
dbe23cd
Completely refactor all fetching for agents to use RTK
parzival418 Oct 8, 2023
c5010c5
Improve styles on agent window more
parzival418 Oct 9, 2023
a425913
Fix styling on table
parzival418 Oct 9, 2023
d1a3d10
Fix event page rendering
parzival418 Oct 10, 2023
26ef633
Add empty feathers client package
parzival418 Oct 10, 2023
5de8598
Remove feathers cient package
parzival418 Oct 11, 2023
1f1781e
Move feathers client to singleton
parzival418 Oct 11, 2023
03965f0
Styling on tables
parzival418 Oct 11, 2023
2db4d0e
Set up subscription in get events rtk query
parzival418 Oct 11, 2023
2d46eee
Remove console log
parzival418 Oct 11, 2023
a61044b
Fix circular dependency with feathers client
parzival418 Oct 12, 2023
476af71
Fix task clone
parzival418 Oct 13, 2023
5dca261
Add create spell modal for now
parzival418 Oct 13, 2023
293bae8
Fix spell menu a bit
parzival418 Oct 13, 2023
753d44a
Remove unused context menu items for now
parzival418 Oct 13, 2023
856b8bb
Switch tree data to get spells with rtk
parzival418 Oct 13, 2023
ca2c4a4
Fix folder renaming bug
parzival418 Oct 13, 2023
14d2106
Add current tab to new state and use to highlight nav in drawer
parzival418 Oct 13, 2023
de707ea
Switch composer window to use gridview for window bar
parzival418 Oct 13, 2023
78b24b1
Fix delete muliple event bug
parzival418 Oct 13, 2023
2ad4229
Initial migration of documents to redux
parzival418 Oct 14, 2023
715c52c
Fix document delete and upload
parzival418 Oct 14, 2023
c7e8358
Improve tab highlighting
parzival418 Oct 14, 2023
74e2951
Improve contrast of theme
parzival418 Oct 14, 2023
d94433a
Add shortcut keys for navigating tabs
parzival418 Oct 15, 2023
c48bff2
Adjust main tab height
parzival418 Oct 15, 2023
a97c227
Add requests rtk query api
parzival418 Oct 15, 2023
ca0a530
Switch to tab if already open
parzival418 Oct 16, 2023
120371e
Unify node styles to main theme
parzival418 Oct 16, 2023
edce98c
Add status bar state
parzival418 Oct 16, 2023
c6e58a0
Add "connected" light
parzival418 Oct 17, 2023
aa08d05
Add new package for feathers redux toolkit integration
parzival418 Oct 17, 2023
c37763c
Improve feathers redux toolkit with type safety
parzival418 Oct 17, 2023
38b7b5d
Improvements to featheres toolkit
parzival418 Oct 17, 2023
f44bd3f
Properly configure feathers toolkit
parzival418 Oct 17, 2023
30feccc
Set up feathers redux root
parzival418 Oct 17, 2023
2709802
Create feathers redux service for agents
parzival418 Oct 17, 2023
d264923
Refactor status bar into its own component
parzival418 Oct 17, 2023
0139b92
Rename agent feathers redux service
parzival418 Oct 17, 2023
fc4a74e
Add method to combine reducers for setup
parzival418 Oct 17, 2023
e8cd9ec
Add root reducer path to generated hooks
parzival418 Oct 17, 2023
db464f6
Export feathers redux stuff from client state package
parzival418 Oct 17, 2023
4fb1f06
Configure root reducer for feathers redux in state
parzival418 Oct 17, 2023
8ef9a4b
Switch to using singleton of feathers client in feathers redux
parzival418 Oct 18, 2023
3a6aad6
Initialize feathers client right away
parzival418 Oct 18, 2023
7d70e5c
Hook up and use new log selector
parzival418 Oct 18, 2023
976336b
Don't pass feathers client into feathers redux root
parzival418 Oct 18, 2023
ed54268
Add log window component from cloud
parzival418 Oct 18, 2023
8b5146b
Blacklist feathers redux from state persistence
parzival418 Oct 18, 2023
c0905a6
Add tailwind to editor
parzival418 Oct 18, 2023
708f482
Make global layout persistent
parzival418 Oct 18, 2023
8beb03c
Merge data streams in right sidebar
parzival418 Oct 18, 2023
66e2f9a
Huge improvements to log window
parzival418 Oct 18, 2023
c201107
export spell log hook from agent feathers redux
parzival418 Oct 18, 2023
71380ce
Add timestamp to all related agent events
parzival418 Oct 18, 2023
5cccae3
Add a default message to spells from remote plugin
parzival418 Oct 18, 2023
c6c26f1
Make log list virtualized
parzival418 Oct 18, 2023
3007445
Move logs into opening panel
parzival418 Oct 18, 2023
9c0bae9
Add some fun gradient
parzival418 Oct 18, 2023
40393e0
A couple more gradient splashes
parzival418 Oct 19, 2023
2ad9a48
Modify gradient on node title
parzival418 Oct 19, 2023
501e96f
310 degree angle on node title gradient
parzival418 Oct 19, 2023
a584ced
Refactor sidebar links to use configurable object
parzival418 Oct 19, 2023
9d46d04
Style changes for consistency across the UI
parzival418 Oct 19, 2023
62cb223
Add watermark to the background of the IDE when no tabs open
parzival418 Oct 20, 2023
dc579d2
Move toasts to bottom right
parzival418 Oct 20, 2023
ff14aa5
Big commit. Migrate all usages of tab.id to access spells to use expl…
parzival418 Oct 20, 2023
73532a1
Improve styling if buttons and dropdowns
parzival418 Oct 20, 2023
732b516
Fix playtest dropdown
parzival418 Oct 20, 2023
9f0cd67
Fix lots of merge issues and errors
parzival418 Nov 3, 2023
9638d9a
Fix last linting errors in unused components
parzival418 Nov 8, 2023
1bfdc4c
Make log item height smaller
parzival418 Nov 8, 2023
a359303
Log agent channel subscription on debug
parzival418 Nov 8, 2023
d6d47e1
Remove usage of project id in channels
parzival418 Nov 8, 2023
cb8df15
Open tab on new spell creation from context menu
parzival418 Nov 8, 2023
feac92a
Clean up logs
parzival418 Nov 8, 2023
e33f9e6
More console logs and traces
parzival418 Nov 8, 2023
75b1f8a
Add trace in to message relay
parzival418 Nov 8, 2023
a9d461f
fixes project name in build steps
Nov 8, 2023
f3efe71
removed old build step
Nov 8, 2023
4bcac23
Turn off timestamps
parzival418 Nov 8, 2023
3d56c7a
Refactor some file structures
parzival418 Nov 9, 2023
4dd779e
Add in behave flow base
parzival418 Nov 9, 2023
7daad80
Fix behave flow type errors
parzival418 Nov 9, 2023
63ef839
Get behave flow hooked up and working
parzival418 Nov 9, 2023
a1e84a5
Add migration for spell type
parzival418 Nov 10, 2023
2724e3a
Clean up routes
parzival418 Nov 10, 2023
331842a
Fix import and new spell in menu bar
parzival418 Nov 10, 2023
1204502
Render components in modal if passed into options
parzival418 Nov 10, 2023
d4a6441
Delete unused files
parzival418 Nov 10, 2023
a30acf9
Add import to create spell modal
parzival418 Nov 10, 2023
3856e1b
Rip out old magick and refactor file structure
parzival418 Nov 10, 2023
9fbf233
Existing components have folders now
parzival418 Nov 10, 2023
c0d19b9
Finish refcatoring editor structure for now
parzival418 Nov 10, 2023
720546c
Rip out old layout provider
parzival418 Nov 11, 2023
2b4edd7
Put new v2 spell behind flag
parzival418 Nov 11, 2023
d502068
Fix syncing spells after deletion in file tree
parzival418 Nov 11, 2023
d395a84
Set proper size to default log window
parzival418 Nov 11, 2023
7e9728c
Fix subspell select open in new tab
parzival418 Nov 11, 2023
b55a4a6
Fix type error
parzival418 Nov 11, 2023
8474c65
Fix react flow background colors
parzival418 Nov 11, 2023
a33f2bc
Clean up unused state and old tab stuff
parzival418 Nov 12, 2023
8908e55
Add new chat window
parzival418 Nov 12, 2023
fb10dff
Use new chat window in new composer
parzival418 Nov 12, 2023
c686d15
Add new tab reducer
parzival418 Nov 12, 2023
e308595
Add support for dynamically injecting tab routes
parzival418 Nov 12, 2023
275d7d5
Remove on connect from flow handlers
parzival418 Nov 12, 2023
f052c35
Fix typo
parzival418 Nov 12, 2023
c052d31
Hook uo react flow behave to redux store
parzival418 Nov 12, 2023
7a52f44
Initialize composer tab redux state
parzival418 Nov 12, 2023
1ed7bfe
Use new redux react flow stuff in flow
parzival418 Nov 12, 2023
c70d508
Trying to fix weird behaviour in graph
parzival418 Nov 12, 2023
0e77278
Debounce graph transform updates
parzival418 Nov 12, 2023
a696f2d
Add empty property window
parzival418 Nov 13, 2023
b2b0529
Selkect active node helper
parzival418 Nov 13, 2023
4705a84
Add react flow state helper functions
parzival418 Nov 13, 2023
3861543
Use react flow state helpers
parzival418 Nov 13, 2023
e14dcba
Export react flow helpers
parzival418 Nov 13, 2023
2846726
Swap from spell v2 to behave for namespacing. Improve icons.
parzival418 Nov 13, 2023
e2da76b
Add new graph window
parzival418 Nov 13, 2023
dfe5b28
use new graph window
parzival418 Nov 13, 2023
8118c44
Load behave graph from spell data
parzival418 Nov 13, 2023
23aa31a
Add back in arguments to chat window run
parzival418 Nov 13, 2023
ff388af
Delete unused code from new composer
parzival418 Nov 13, 2023
14719e5
Clean up
parzival418 Nov 13, 2023
680c77d
Fix bug rendering documents in file tree
parzival418 Nov 14, 2023
32c5181
Fix build error
parzival418 Nov 14, 2023
32450f3
Fix linting warnings (mostly)
parzival418 Nov 14, 2023
7872fa7
Add create spell button to file menu
parzival418 Nov 14, 2023
d25f667
Remove coming soon items in file tree
parzival418 Nov 14, 2023
9faa090
Fix filetree
parzival418 Nov 14, 2023
b4cd13f
Prevent folders from being renamed
parzival418 Nov 14, 2023
0f1f54a
Fix typing of application in spell manager
parzival418 Nov 14, 2023
033b74f
Fix scrolling on agent config
parzival418 Nov 15, 2023
a490eda
Delimit available plugins
parzival418 Nov 15, 2023
9613a0f
Fix trailing slash in api url for rest plugin
parzival418 Nov 15, 2023
8c3b568
Change update to save
parzival418 Nov 15, 2023
d99b498
Show spells at top level of file tree for now
parzival418 Nov 15, 2023
d90bd4f
Add disacord api token instructions
parzival418 Nov 15, 2023
e555271
Change discord edit button to configure
parzival418 Nov 15, 2023
2275189
Change all edit buttons in agent config to configure
parzival418 Nov 15, 2023
047a557
Close modal on spell creation
parzival418 Nov 15, 2023
9a294c5
Fix spell file highlighting in file tree
parzival418 Nov 15, 2023
837e4b3
Add home optionin menu
parzival418 Nov 15, 2023
60c9453
Make inactive tabs more visible.
parzival418 Nov 15, 2023
73df53d
Remove console log
parzival418 Nov 15, 2023
ef5d3e4
Fix graph spell saving
parzival418 Nov 15, 2023
94a908e
Fix styles on create new
parzival418 Nov 15, 2023
7af7f6c
Fix weird initial load bug in sidebar UI
parzival418 Nov 15, 2023
a86e467
Change data in spell double click to open spell in tab
parzival418 Nov 15, 2023
0de7c10
Fix title casing on menu items. Add project import.
parzival418 Nov 15, 2023
aefeecf
Move menu item context menu click handler element
parzival418 Nov 15, 2023
ec09532
Remove create spell from file list
parzival418 Nov 15, 2023
e6aef96
Add create spell button above file list
parzival418 Nov 15, 2023
3927f13
Fix subscribe type
parzival418 Nov 15, 2023
e00b9ec
Subscribe to open tab in tab layout
parzival418 Nov 15, 2023
451a496
Export root api from state package
parzival418 Nov 15, 2023
e55275c
Fix default pubsub context subscribe type
parzival418 Nov 15, 2023
f611db9
Fix screen link item height
parzival418 Nov 15, 2023
77304a8
Add name field to echo node
parzival418 Nov 15, 2023
7e65983
Fix discord config window
parzival418 Nov 15, 2023
f0f6853
Add tab layout storage namespce by project id
parzival418 Nov 16, 2023
0c8791f
Fix typescript issues
parzival418 Nov 16, 2023
de3066f
Fix weird drawer rendering error again
parzival418 Nov 16, 2023
076ce82
Close tab on spell delete
parzival418 Nov 16, 2023
e835efb
Fix circular dependency
parzival418 Nov 16, 2023
da1e81c
Make log errors red
parzival418 Nov 16, 2023
dad7abd
Make sure connected dot starts red
parzival418 Nov 16, 2023
34abb1d
Fix spell query key
parzival418 Nov 16, 2023
8dddda2
Fix spell by name and remove non agent run code
parzival418 Nov 16, 2023
d7e44a9
Dont run one input if coming from variable node
parzival418 Nov 16, 2023
124d4cb
Fix build issues
parzival418 Nov 16, 2023
66e25e6
Fix tye error in intent
parzival418 Nov 16, 2023
5e41e89
Clean up root folder
parzival418 Nov 16, 2023
3aec6a3
Upgrade NX to 17.1.2
parzival418 Nov 16, 2023
79eef46
Add new empty plugin package
parzival418 Nov 16, 2023
17d2b3b
initial agent deploy changes
Oct 25, 2023
6545c96
fixed migrations and added spell freezing
Nov 6, 2023
9b00067
WIP
Nov 10, 2023
8b78151
added inital agent release work and bruno files
Nov 17, 2023
7f9e84d
Fixed a bunch of type issues around feathers find and pagination
Nov 17, 2023
c868776
updated spell get to check versions
Nov 17, 2023
a5bbe62
fixed a package.json issue and some spell typing weirdnes
Nov 21, 2023
906b7fd
bruno updates and small agent & spell fixes
Nov 21, 2023
0d7ad44
Fixed various new type issues and spell saving
Nov 27, 2023
72d64f7
Adds the agent releases table
Nov 28, 2023
b59176f
cleans up changes to be ready for the new behave graph stuff
Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 9 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
###### Default settings, override in .env.local file that is auto-generated on install ######
DATABASE_URL=postgresql://magick:magick_default_pw@localhost:5432/magick
# Copy these to .env.local and fill in your own values to customize
CLIENT_PLUGINS=github,rest,discord,twitter,loop,task,googleai,openai,search,bluesky,avatar,elevenlabs,database,anthropic,intent
SERVER_PLUGINS=github,rest,discord,twitter,loop,task,googleai,openai,search,bluesky,elevenlabs,database,anthropic,intent
# CLIENT_PLUGINS=github,rest,discord,twitter,loop,task,googleai,openai,search,bluesky,elevenlabs,database,anthropic,intent
# SERVER_PLUGINS=github,rest,discord,twitter,loop,task,googleai,openai,search,bluesky,elevenlabs,database,anthropic,intent
CLIENT_PLUGINS=discord,twitter,loop,googleai,openai,search,elevenlabs,database,anthropic,intent
SERVER_PLUGINS=discord,twitter,loop,googleai,openai,search,elevenlabs,database,anthropic,intent


# Memory to use for build cache
NODE_OPTIONS="--max-old-space-size=8192"
Expand Down Expand Up @@ -30,8 +33,8 @@ POSTHOG_API_KEY=key
VITE_APP_PRODUCTION=false
PRODUCTION=false

VITE_APP_STANDALONE=true
STANDALONE=true
VITE_APP_STANDALONE=false
STANDALONE=false

REDISCLOUD_HOST=localhost
REDISCLOUD_URL=redis://localhost:6379
Expand All @@ -56,4 +59,5 @@ AWS_REGION=region
AWS_BUCKET_NAME=bucket_name
AWS_BUCKET_ENDPOINT=endpoint

CLOUD_AGENT_KEY=key
CLOUD_AGENT_KEY=key
APT_ROOT_URL=http://0.0.0.0
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-extra-semipackages/client/core/src/components/Drawer/Newsidebar": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off"
}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ apps/docs/api/index.md
data.json
/logs
docstore.json
.vercel
.vercel
.nx/cache
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/coverage
/.nx/cache
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
"request": "attach",
"port": 7777
},
{
"name": "CloudAgentWorker",
"type": "node",
"request": "attach",
"port": 8089,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"name": "Server",
"type": "node",
Expand Down
2 changes: 1 addition & 1 deletion apps/agent/knexfile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DATABASE_URL } from '@magickml/config'
import { DATABASE_URL } from 'shared/config'

const config = {
client: 'pg',
Expand Down
2 changes: 1 addition & 1 deletion apps/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"knex": "^2.4.2",
"@magickml/core": "file:../../dist/packages/shared/core",
"shared/core": "file:../../dist/packages/shared/core",
"@magickml/server-core": "file:../../dist/packages/server-core"
}
}
11 changes: 5 additions & 6 deletions apps/agent/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"sourceRoot": "apps/agent/src",
"projectType": "application",
"implicitDependencies": [
"@magickml/server-core",
"@magickml/core",
"@magickml/agents",
"server-core",
"shared-core",
"server-agents",
"@magickml/plugin-*"
],
"targets": {
Expand Down Expand Up @@ -56,7 +56,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
],
Expand All @@ -72,8 +72,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "apps/agent/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/agent/jest.config.ts"
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions apps/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* @packageDocumentation
*/

import { AgentManager } from '@magickml/agents'
import { app, initApp } from '@magickml/server-core'
import { initLogger, getLogger } from '@magickml/core'
import { AgentManager } from 'server/agents'
import { app, initApp } from 'server/core'
import { initLogger, getLogger } from 'shared/core'
import 'regenerator-runtime/runtime'
import pluginExports from './plugins'
import { PRODUCTION, DONT_CRASH_ON_ERROR } from '@magickml/config'
import { PRODUCTION, DONT_CRASH_ON_ERROR } from 'shared/config'

/**
* Asynchronously loads the application's plugins and logs their names.
Expand Down
4 changes: 2 additions & 2 deletions apps/agent/test/app.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For more information about this file see https://dove.feathersjs.com/guides/cli/app.test.html
import assert from 'assert'
import axios from 'axios'
import { app } from '@magickml/server-core'
import { app } from 'server/core'

const port = app.get('port')
const appUrl = `http://${app.get('host')}:${port}`
Expand All @@ -16,7 +16,7 @@ describe('Feathers application tests', () => {
it('shows a 404 JSON error', async () => {
try {
await axios.get(`${appUrl}/path/to/nowhere`, {
responseType: 'json',
responseType: 'json'
})
assert.fail('should never get here')
} catch (error: any) {
Expand Down
7 changes: 3 additions & 4 deletions apps/client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/client/src",
"projectType": "application",
"implicitDependencies": ["@magickml/editor", "@magickml/core"],
"implicitDependencies": ["client-editor", "shared-core"],
"targets": {
"build": {
"executor": "@nx/vite:build",
Expand Down Expand Up @@ -57,7 +57,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/client/**/*.{ts,tsx,js,jsx}"]
Expand All @@ -67,8 +67,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/client"],
"options": {
"jestConfig": "apps/client/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/client/jest.config.ts"
}
}
},
Expand Down
22 changes: 13 additions & 9 deletions apps/client/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// DOCUMENTED
import { createRoot } from 'react-dom/client'
import { MagickIDE } from '@magickml/editor'
import { AppConfig } from '@magickml/client-core'
import { MagickIDE } from 'client/editor'
import {
DEFAULT_PROJECT_ID,
API_ROOT_URL,
Expand All @@ -10,16 +9,17 @@ import {
POSTHOG_ENABLED,
DEFAULT_USER_TOKEN,
STANDALONE,
} from '@magickml/config'
} from 'shared/config'
import { PostHogProvider } from 'posthog-js/react'
import { initLogger, getLogger } from '@magickml/core'
import { initLogger, getLogger } from 'shared/core'

import plugins from './plugins'
import { AppConfig } from '@magickml/providers'

// We want to add this back in eventually, but it's causing some visual bugs
//import './globals.css'

initLogger({ name: "AIDE" })
initLogger({ name: 'AIDE' })

const logger = getLogger()

Expand All @@ -28,9 +28,9 @@ logger.info('loaded with plugins %o', plugins)
* Initialize and render the MagickIDE component when running as a standalone editor (not inside an iframe)
*/
if (window === window.parent) {
logger.info("not in iframe")
logger.info('not in iframe')
if (STANDALONE) {
logger.info("standalone")
logger.info('standalone')
const container = document.getElementById('root') as Element
const root = createRoot(container) // createRoot(container!) if you use TypeScript
; (window as any).root = root
Expand All @@ -56,11 +56,15 @@ if (window === window.parent) {
root.render(<Root />)
}
} else {
logger.info("iframe: In iframe")
logger.info('iframe: In iframe')
/**
* If the editor is loaded in an iframe, listen for messages from the parent to initialize and render the MagickIDE component
*/
const TRUSTED_PARENT_URLS = [TRUSTED_PARENT_URL, 'https://www.magickml.com', 'https://beta.magickml.com'].map(url => url.replace(/\/+$/, ''));
const TRUSTED_PARENT_URLS = [
TRUSTED_PARENT_URL,
'https://www.magickml.com',
'https://beta.magickml.com']
.map(url => url.replace(/\/+$/, ''));

window.addEventListener(
'message',
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud-agent-manager/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/cloud-agent-manager/**/*.ts"]
Expand Down
33 changes: 17 additions & 16 deletions apps/cloud-agent-manager/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { CloudAgentManager, FeathersSyncReporter } from "@magickml/cloud-agent-manager"
import { initLogger, getLogger } from "@magickml/core"
import { app, BullQueue, initApp } from "@magickml/server-core"
import { DONT_CRASH_ON_ERROR, PRODUCTION } from "@magickml/config"
import { initAgentCommander } from "@magickml/agents"
import {
CloudAgentManager,
FeathersSyncReporter,
} from 'server/cloud-agent-manager'
import { initLogger, getLogger } from 'shared/core'
import { app, BullQueue, initApp } from 'server/core'
import { DONT_CRASH_ON_ERROR, PRODUCTION } from 'shared/config'
import { initAgentCommander } from 'server/agents'
import { getPinoTransport } from '@hyperdx/node-opentelemetry'

if (PRODUCTION) {
initLogger({
name: 'cloud-agent-manager',
transport: {
targets: [
getPinoTransport('info')
]
},
level: 'info',
})
initLogger({
name: 'cloud-agent-manager',
transport: {
targets: [getPinoTransport('info')],
},
level: 'info',
})
} else {
initLogger({ name: 'cloud-agent-manager' })
}
initLogger({ name: 'cloud-agent-manager' })
}
const logger = getLogger()

function start() {
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud-agent-worker/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/cloud-agent-worker/**/*.ts"]
Expand Down
14 changes: 7 additions & 7 deletions apps/cloud-agent-worker/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CloudAgentWorker } from '@magickml/cloud-agent-worker'
import { initLogger, getLogger } from '@magickml/core'
import { initApp } from '@magickml/server-core'
import { CloudAgentWorker } from 'server/cloud-agent-worker'
import { initLogger, getLogger } from 'shared/core'
import { initApp } from 'server/core'
import pluginExports from './plugins'
import { initAgentCommander } from '@magickml/agents'
import { DONT_CRASH_ON_ERROR, PRODUCTION } from '@magickml/config'
import { initAgentCommander } from 'server/agents'
import { DONT_CRASH_ON_ERROR, PRODUCTION } from 'shared/config'
import { getPinoTransport } from '@hyperdx/node-opentelemetry'

if (PRODUCTION) {
Expand Down Expand Up @@ -34,11 +34,11 @@ async function loadPlugins(): Promise<void> {

if (PRODUCTION || DONT_CRASH_ON_ERROR) {
process.on('uncaughtException', (e: any) => {
logger.error('Uncaught exception: %s\n From: %o', e, e.stack)
logger.error(e, 'Uncaught exception: %s\n From: %o', e)
})

process.on('unhandledRejection', (e: any) => {
logger.error('Unhandled rejection: %s\n From: %o', e, e.stack)
logger.error(e, 'Unhandled rejection: %s\n From: %o', e)
})
}

Expand Down
18 changes: 15 additions & 3 deletions apps/docs/docs/developer-guides/Package Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,49 @@ sidebar_position: 1
# Package Overview

## Apps

### Client

@magickml/client (./apps/client)
Frontend application. Everything the user sees in Magick IDE is exposed through the client, although most of the code lives in client-core and editor packages, as well as engine. Thin, mostly contains build settings and entrypoint.

### Server

@magickml/server (./apps/server)
Backend server application. Depends on server-core and engine. Thin, mostly contains startup code and configuration for the server. Provides an API which the client talks to, and runs preview spells for clients.

### Agent

@magickml/agent (./apps/agent)
Backend agent application. Depends on server-core and engine. Thin, startups the AgentManager and manages agents from the database. Talks directly to the database, not to the server.

### Docs

@magickml/docs (./apps/docs)
Documentation server build on Docusaurus.

## Shared Packages

### Engine
@magickml/core (./packages/core/shared)
Core runtime code for Magick. Contains all of the spell and spell running code, common interfaces and nodes. Available for install via [npm](https://www.npmjs.com/package/@magickml/core)

shared/core (./packages/core/shared)
Core runtime code for Magick. Contains all of the spell and spell running code, common interfaces and nodes. Available for install via [npm](https://www.npmjs.com/package/shared/core)

## Front End Packages

### Client Core

@magickml/client-core (./packages/core/client)
Frontend UI components and common code.

### Editor

@magickml/editor
Application code for the IDE, including windows, providers and state. Used in the client. Exports the entire Magick editor as components which can be imported whole or individually for custom routing (for example, in a Next.js frontend). Available for install via [npm](https://www.npmjs.com/package/@magickml/editor)

## Server Packages

### Server Core

@magickml/server-core (./packages/core/server)
Contains all of the server code, imported by the server and agent apps.
Contains all of the server code, imported by the server and agent apps.
Loading
Loading