-
Notifications
You must be signed in to change notification settings - Fork 1
[TRIAL] feat: add experimental Svelte support #801
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
base: main
Are you sure you want to change the base?
Conversation
This is a trial implementation of Svelte support for the Agentuity SDK. Changes: - Add @agentuity/svelte package with client and context utilities - Update vite-builder.ts to detect and use Svelte plugin for Svelte projects - Update registry-generator.ts to add module augmentation for @agentuity/svelte - Add Svelte template with example agent and API route - Update templates.json to include Svelte template option Note: This is an experimental feature and should be reviewed carefully. Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/server": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-server-0.1.39-13702a6.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-frontend-0.1.39-13702a6.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-runtime-0.1.39-13702a6.tgz",
"@agentuity/svelte": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-svelte-0.1.39-13702a6.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-core-0.1.39-13702a6.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-opencode-0.1.39-13702a6.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-cli-0.1.39-13702a6.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-evals-0.1.39-13702a6.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-react-0.1.39-13702a6.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-schema-0.1.39-13702a6.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-workbench-0.1.39-13702a6.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-auth-0.1.39-13702a6.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-server-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-frontend-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-runtime-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-svelte-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-core-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-opencode-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-cli-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-evals-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-react-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-schema-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-workbench-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-auth-0.1.39-13702a6.tgz |
This ensures the @agentuity/svelte package is built during the TypeScript build step, which is required for CI verification. Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
This ensures the @agentuity/svelte package is packed and available for template integration tests, fixing the 404 error when testing the Svelte template. Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
templates/templates.json
Outdated
| "name": "Default Template", | ||
| "description": "Showcases core Agentuity features using OpenAI SDK", | ||
| "directory": "default" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only want to have one template in this repo so remove this and the template and move to examples folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I've moved the Svelte template from templates/svelte/ to examples/svelte/ and removed it from templates.json. The @agentuity/svelte package remains in packages/svelte/ for projects that want to use Svelte.
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
[TRIAL] feat: add experimental Svelte support
Summary
This PR adds experimental Svelte support to the Agentuity SDK. This is a trial implementation and should be reviewed carefully before considering for merge.
The changes include:
New
@agentuity/sveltepackage - Client library withcreateClient,createAPIClient, and context initialization functions (initAgentuity,setAuthHeader,setBaseUrl). Uses global state management similar to@agentuity/react.Build system changes - Modified
vite-builder.tsto detect Svelte projects (by checking for.sveltefiles or svelte in package.json) and dynamically load@sveltejs/vite-plugin-svelteinstead of the React plugin.Registry generator updates - Added module augmentation for
@agentuity/svelteinregistry-generator.tsso route types are available in Svelte projects.Svelte example - Example project at
examples/svelte/with a hello agent and Svelte 5 component demonstrating API client usage. (Note: This is an example, not a template - it won't appear inagentuity create.)Updates since last revision
templates/svelte/toexamples/svelte/per review feedbacktemplates/templates.json(only one template should exist in this repo)Review & Testing Checklist for Human
examples/svelte/to a new project, add dependencies, and verifyagentuity buildworksvite-builder.tsRecommended test plan:
agentuity createand verify it worksexamples/svelte/as referenceagentuity devon the Svelte project and verify the build succeedsNotes
$state,mountfrom 'svelte') - not compatible with Svelte 4examples/svelte/is a reference implementation, not a scaffoldable templateLink to Devin run: https://app.devin.ai/sessions/3d30dacf70bf47b5b085563f22a8c0f5
Requested by: @Huijiro