Compare commits
3 Commits
38dc36e846
...
4d74c38618
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d74c38618 | ||
|
|
8a1b204179 | ||
|
|
b19f5a3518 |
@@ -3,10 +3,11 @@
|
|||||||
# --- Vaihe 1: Frontend (Astro) ---
|
# --- Vaihe 1: Frontend (Astro) ---
|
||||||
FROM node:22-slim AS frontend
|
FROM node:22-slim AS frontend
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
|
# Riippuvuudet ensin → cache-kerros (muuttuu harvoin)
|
||||||
COPY frontend/package.json frontend/package-lock.json* ./
|
COPY frontend/package.json frontend/package-lock.json* ./
|
||||||
RUN npm install --silent
|
RUN npm install --silent
|
||||||
|
# Lähdekoodi → muuttuu usein, mutta npm install on cachessa
|
||||||
COPY frontend/ .
|
COPY frontend/ .
|
||||||
COPY frontend/public/pkg public/pkg
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# --- Vaihe 2: Wasm (wasm-pack) ---
|
# --- Vaihe 2: Wasm (wasm-pack) ---
|
||||||
|
|||||||
33
network-poc/deploy-light.sh
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Kevyt deploy: lähetetään vain koodi, palvelin buildaa itse
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SERVER="ubuntu@86.50.252.98"
|
||||||
|
REMOTE_DIR="~/code/agentic-studio/network-poc"
|
||||||
|
SSH_OPTS="-o StrictHostKeyChecking=no"
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
|
||||||
|
echo "=== Kipinä Studio Deploy (remote build) ==="
|
||||||
|
|
||||||
|
# 1. Synkataan koodi palvelimelle (vain muuttuneet tiedostot)
|
||||||
|
echo "[1/3] Synkataan koodi..."
|
||||||
|
rsync -az --delete \
|
||||||
|
--exclude 'target/' \
|
||||||
|
--exclude 'node_modules/' \
|
||||||
|
--exclude 'dist/' \
|
||||||
|
--exclude '.astro/' \
|
||||||
|
--exclude 'temp/' \
|
||||||
|
--exclude '*.db' \
|
||||||
|
--exclude '.git/' \
|
||||||
|
"$SCRIPT_DIR/" "$SERVER:$REMOTE_DIR/"
|
||||||
|
|
||||||
|
# 2. Rakennetaan image palvelimella
|
||||||
|
echo "[2/3] Rakennetaan image palvelimella..."
|
||||||
|
ssh $SSH_OPTS $SERVER "cd $REMOTE_DIR && docker build -f Dockerfile.prod -t kipina-agentic:latest ."
|
||||||
|
|
||||||
|
# 3. Käynnistetään
|
||||||
|
echo "[3/3] Käynnistetään..."
|
||||||
|
ssh $SSH_OPTS $SERVER "cd $REMOTE_DIR && docker compose -f docker-compose.prod.yml down && docker compose -f docker-compose.prod.yml up -d"
|
||||||
|
|
||||||
|
echo "=== Valmis! https://kipina.studio ==="
|
||||||
|
Before Width: | Height: | Size: 696 KiB |
BIN
network-poc/frontend/public/avatars/aikuinen_susi.webp
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 757 KiB |
BIN
network-poc/frontend/public/avatars/bear.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 700 KiB |
BIN
network-poc/frontend/public/avatars/beaver.webp
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 731 KiB |
BIN
network-poc/frontend/public/avatars/chameleon.webp
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 711 KiB |
BIN
network-poc/frontend/public/avatars/elephant.webp
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 695 KiB |
BIN
network-poc/frontend/public/avatars/gecko.webp
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 130 KiB |
BIN
network-poc/frontend/public/avatars/gecko_notext.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 432 KiB |
BIN
network-poc/frontend/public/avatars/karhunpentu.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 650 KiB |
BIN
network-poc/frontend/public/avatars/kettu_notext.webp
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 389 KiB |
BIN
network-poc/frontend/public/avatars/kipina_notext.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 596 KiB |
BIN
network-poc/frontend/public/avatars/laiskiainen.webp
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 496 KiB |
BIN
network-poc/frontend/public/avatars/laiskiainen_notext.webp
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 872 KiB |
BIN
network-poc/frontend/public/avatars/lion.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 738 KiB |
BIN
network-poc/frontend/public/avatars/mantis.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 813 KiB |
BIN
network-poc/frontend/public/avatars/owl.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 658 KiB |
BIN
network-poc/frontend/public/avatars/penguin.webp
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 593 KiB |
BIN
network-poc/frontend/public/avatars/pesukarhu.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 563 KiB |
BIN
network-poc/frontend/public/avatars/pesukarhu_notext.webp
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 696 KiB |
BIN
network-poc/frontend/public/avatars/serpent.webp
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 718 KiB |
BIN
network-poc/frontend/public/avatars/spider.webp
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 513 KiB |
BIN
network-poc/frontend/public/avatars/susi_notext.webp
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 780 KiB |
BIN
network-poc/frontend/public/avatars/tortoise.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 826 KiB |
BIN
network-poc/frontend/public/avatars/walrus.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -66,7 +66,7 @@ import Settings from "../components/Settings.astro";
|
|||||||
|
|
||||||
// === Globaalit tilat ===
|
// === Globaalit tilat ===
|
||||||
const defaultAgents = {
|
const defaultAgents = {
|
||||||
manager: { name: 'Manageri', avatar: '/avatars/karhunpentu.png', model: 'qwen-coder', order: 0,
|
manager: { name: 'Manageri', avatar: '/avatars/karhunpentu.webp', model: 'qwen-coder', order: 0,
|
||||||
temperature: 0.5, topK: 40, repeatPenalty: 1.15, maxTokens: 512,
|
temperature: 0.5, topK: 40, repeatPenalty: 1.15, maxTokens: 512,
|
||||||
prompt: `You are a senior project manager and software architect. Your job is to plan the file structure of a software project.
|
prompt: `You are a senior project manager and software architect. Your job is to plan the file structure of a software project.
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ models.py: SQLAlchemy database models and engine setup
|
|||||||
schemas.py: Pydantic request/response schemas
|
schemas.py: Pydantic request/response schemas
|
||||||
main.py: FastAPI application with CRUD endpoints
|
main.py: FastAPI application with CRUD endpoints
|
||||||
pyproject.toml: project dependencies` },
|
pyproject.toml: project dependencies` },
|
||||||
coder: { name: 'Koodari', avatar: '/avatars/kipina_notext.png', model: 'qwen-coder', order: 1,
|
coder: { name: 'Koodari', avatar: '/avatars/kipina_notext.webp', model: 'qwen-coder', order: 1,
|
||||||
temperature: 0.7, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
temperature: 0.7, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
||||||
prompt: `You are an expert Python developer. Write complete, production-ready code.
|
prompt: `You are an expert Python developer. Write complete, production-ready code.
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ NEVER:
|
|||||||
- Forget to import from other project files
|
- Forget to import from other project files
|
||||||
- Use requirements.txt or Poetry — always use pyproject.toml with [project] format (PEP 621)
|
- Use requirements.txt or Poetry — always use pyproject.toml with [project] format (PEP 621)
|
||||||
- Use pip install — use uv (e.g. uv run uvicorn main:app --reload)` },
|
- Use pip install — use uv (e.g. uv run uvicorn main:app --reload)` },
|
||||||
data: { name: 'Data', avatar: '/avatars/pesukarhu_notext.png', model: 'qwen-coder', order: 2,
|
data: { name: 'Data', avatar: '/avatars/pesukarhu_notext.webp', model: 'qwen-coder', order: 2,
|
||||||
temperature: 0.5, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
temperature: 0.5, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
||||||
prompt: `You are a database architect specializing in SQLAlchemy and relational databases.
|
prompt: `You are a database architect specializing in SQLAlchemy and relational databases.
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ ALWAYS INCLUDE:
|
|||||||
- from sqlalchemy.ext.declarative import declarative_base
|
- from sqlalchemy.ext.declarative import declarative_base
|
||||||
- from sqlalchemy.orm import sessionmaker
|
- from sqlalchemy.orm import sessionmaker
|
||||||
- DATABASE_URL, engine, SessionLocal, Base` },
|
- DATABASE_URL, engine, SessionLocal, Base` },
|
||||||
qa: { name: 'QA', avatar: '/avatars/susi_notext.png', model: 'qwen-coder', order: 3,
|
qa: { name: 'QA', avatar: '/avatars/susi_notext.webp', model: 'qwen-coder', order: 3,
|
||||||
temperature: 0.4, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
temperature: 0.4, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
||||||
prompt: `You are a QA engineer writing automated tests.
|
prompt: `You are a QA engineer writing automated tests.
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ TEST STRUCTURE:
|
|||||||
5. test_delete: DELETE → 204, verify GET returns 404 after
|
5. test_delete: DELETE → 204, verify GET returns 404 after
|
||||||
|
|
||||||
ALWAYS: from fastapi.testclient import TestClient` },
|
ALWAYS: from fastapi.testclient import TestClient` },
|
||||||
tester: { name: 'DevOps', avatar: '/avatars/laiskiainen_notext.png', model: 'qwen-coder', order: 4,
|
tester: { name: 'DevOps', avatar: '/avatars/laiskiainen_notext.webp', model: 'qwen-coder', order: 4,
|
||||||
temperature: 0.3, topK: 40, repeatPenalty: 1.1, maxTokens: 512,
|
temperature: 0.3, topK: 40, repeatPenalty: 1.1, maxTokens: 512,
|
||||||
prompt: `You are a strict code reviewer and static analysis expert. Analyze the code line by line.
|
prompt: `You are a strict code reviewer and static analysis expert. Analyze the code line by line.
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ RESPOND:
|
|||||||
- If all checks pass: "LGTM"
|
- If all checks pass: "LGTM"
|
||||||
- If issues found: list each as "ISSUE: filename.py: description"
|
- If issues found: list each as "ISSUE: filename.py: description"
|
||||||
- Be specific and actionable, not vague` },
|
- Be specific and actionable, not vague` },
|
||||||
observer: { name: 'Tarkkailija', avatar: '/avatars/aikuinen_susi.png', model: 'qwen-coder', order: 5,
|
observer: { name: 'Tarkkailija', avatar: '/avatars/aikuinen_susi.webp', model: 'qwen-coder', order: 5,
|
||||||
temperature: 0.6, topK: 40, repeatPenalty: 1.15, maxTokens: 512,
|
temperature: 0.6, topK: 40, repeatPenalty: 1.15, maxTokens: 512,
|
||||||
prompt: `You are an independent technical observer and risk analyst.
|
prompt: `You are an independent technical observer and risk analyst.
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ OUTPUT FORMAT:
|
|||||||
// Uuden agentin luonti
|
// Uuden agentin luonti
|
||||||
window.addCustomAgent = function() {
|
window.addCustomAgent = function() {
|
||||||
const id = 'custom_' + Date.now();
|
const id = 'custom_' + Date.now();
|
||||||
const avatars = ['/avatars/bear.png','/avatars/beaver.png','/avatars/gecko.png','/avatars/lion.png','/avatars/penguin.png','/avatars/spider.png','/avatars/walrus.png','/avatars/serpent.png'];
|
const avatars = ['/avatars/bear.webp','/avatars/beaver.webp','/avatars/gecko.webp','/avatars/lion.webp','/avatars/penguin.webp','/avatars/spider.webp','/avatars/walrus.webp','/avatars/serpent.webp'];
|
||||||
agents[id] = {
|
agents[id] = {
|
||||||
name: 'Uusi agentti',
|
name: 'Uusi agentti',
|
||||||
avatar: avatars[Math.floor(Math.random() * avatars.length)],
|
avatar: avatars[Math.floor(Math.random() * avatars.length)],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "hub"
|
name = "hub"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||