Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/deploy-changed-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ jobs:
# This BYOC-only sample exceeds the retired Playground staging quota.
git diff --name-only HEAD $LAST_ANCESTOR \
| grep '^samples/' \
| awk -F'/' '$2 != "self-improving-mastra" {print $1"/"$2}' \
| awk -F'/' '$2 != "self-improving" {print $1"/"$2}' \
| sort \
| uniq > changed_samples.txt
| uniq \
| while read -r sample; do
# A renamed or deleted sample still shows up in the diff, but
# there is nothing left to deploy. Without this the job fails
# with "no results found".
if [ -d "$sample" ]; then echo "$sample"; fi
done > changed_samples.txt
if [ -s changed_samples.txt ]; then
echo "should_continue=true" >> $GITHUB_ENV
echo "The following samples have changed:"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ When you add a new sample, make sure to add any config vals to the `deploy-chang
| [Rocket](./samples/rocket) | A simple Rocket app. | Rocket | Rust |
| [Sails.js](./samples/sailsjs) | A short hello world application demonstrating how to deploy Sails.js onto Defang. | Sails.js, Node.js | nodejs |
| [Sails.js & PostgreSQL](./samples/sailsjs-postgres) | A sample project demonstrating how to deploy a project with PostgreSQL and Sails.js. | PostgreSQL, Sails.js, SQL, JavaScript | nodejs |
| [Self-Improving Mastra Todo](./samples/self-improving-mastra) | A Next.js todo app where an admin can turn stored user feedback into live code changes with a Mastra coding agent. | Mastra, Next.js, PostgreSQL, Better Auth, AI, Agents | TypeScript, JavaScript, Docker |
| [Self-Improving Mastra Todo](./samples/self-improving) | A Next.js todo app where an admin can turn stored user feedback into live code changes with a Mastra coding agent. | Mastra, Next.js, PostgreSQL, Better Auth, AI, Agents | TypeScript, JavaScript, Docker |
| [Svelte & Node.js & MySQL](./samples/svelte-mysql) | A full-stack application using Svelte for the frontend, Node.js for the backend, and MySQL for the database. | Svelte, Node.js, MySQL, Full-stack, JavaScript, TypeScript, SQL | nodejs |
| [SvelteKit](./samples/sveltekit) | A minimal SvelteKit app running on Defang. | SvelteKit, TypeScript, JavaScript, Svelte, Node.js, Frontend, TypeScript, JavaScript | nodejs |
| [SvelteKit & MongoDB](./samples/sveltekit-mongodb) | A full-stack application using SvelteKit for the frontend and MongoDB for the database. | SvelteKit, MongoDB, Full-stack, Node.js, JavaScript | nodejs |
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Self-Improving Mastra Todo

[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/self-improving-mastra)
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/self-improving)

This sample is a multi-user Next.js todo app that turns user feedback into live
code changes. Better Auth and PostgreSQL provide accounts, private todo lists,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "self-improving-mastra-agent",
"name": "self-improving-agent",
"private": true,
"type": "module",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function renderShell(who: string): string {
}

const CONSOLE_SCRIPT = `
const KEY = "self-improving-mastra-active-run";
const KEY = "self-improving-active-run";
const selected = new Set();
let pollTimer;
const $ = (id) => document.getElementById(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const exec = promisify(execFile);
*/
export const REPO_DIR = LIVE_REPO;

const AGENT_IDENTITY = ["-c", "user.name=coding-agent", "-c", "user.email=agent@self-improving-mastra.local"];
const AGENT_IDENTITY = ["-c", "user.name=coding-agent", "-c", "user.email=agent@self-improving.local"];

async function git(
args: string[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# coding agent's edits land in your working tree. The local model is a small
# one so it runs on a laptop; expect much lower edit quality than the
# deployed Vertex AI model — local is for testing the loop, not the quality.
name: self-improving-mastra-dev
name: self-improving-dev
services:
dev:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: self-improving-mastra
name: self-improving
services:
# The production to-do app. Runs a Next.js production build with no source
# code, no agent, and no admin UI. Exactly one ingress port keeps it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd /workspace
if [ ! -d .git ]; then
git init -q -b main
git add -A
git -c user.name="coding-agent" -c user.email="agent@self-improving-mastra.local" \
git -c user.name="coding-agent" -c user.email="agent@self-improving.local" \
commit -qm "baseline: as deployed"
else
echo "existing git history: $(git rev-list --count HEAD 2>/dev/null || echo 0) commit(s) at $(git rev-parse --short HEAD 2>/dev/null || echo '?')"
Expand Down
Loading