Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| befb9d2334 | |||
| 78266f1c9d | |||
| a7bb4ef2b5 | |||
| 5dbf931e58 | |||
| c042a4c8e1 | |||
| 9ff57141d1 | |||
| 27cc9728e0 |
@@ -0,0 +1,14 @@
|
|||||||
|
from flask import Flask, jsonify
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/api/health')
|
||||||
|
def health():
|
||||||
|
return jsonify({'status': 'ok', 'module': 'api'})
|
||||||
|
|
||||||
|
@app.route('/api/version')
|
||||||
|
def version():
|
||||||
|
return jsonify({'version': '1.0.0'})
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(host='0.0.0.0', port=5000)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
flask>=3.0
|
||||||
|
gunicorn>=21.2
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from flask import jsonify
|
||||||
|
|
||||||
|
def register_routes(app):
|
||||||
|
@app.route('/api/users')
|
||||||
|
def list_users():
|
||||||
|
return jsonify({'users': []})
|
||||||
|
|
||||||
|
@app.route('/api/users/<int:user_id>')
|
||||||
|
def get_user(user_id):
|
||||||
|
return jsonify({'id': user_id, 'name': 'Alice'})
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Agent Collaboration Test
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import sqlite3
|
||||||
|
import os
|
||||||
|
|
||||||
|
DB_PATH = 'app.db'
|
||||||
|
|
||||||
|
def migrate():
|
||||||
|
conn = sqlite3.connect(DB_PATH)
|
||||||
|
cursor = conn.cursor()
|
||||||
|
|
||||||
|
with open('schema.sql', 'r') as f:
|
||||||
|
cursor.executescript(f.read())
|
||||||
|
|
||||||
|
with open('seed.sql', 'r') as f:
|
||||||
|
cursor.executescript(f.read())
|
||||||
|
|
||||||
|
conn.commit()
|
||||||
|
conn.close()
|
||||||
|
print(f"Database migrated: {DB_PATH}")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
migrate()
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
name TEXT NOT NULL,
|
||||||
|
email TEXT UNIQUE,
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS sessions (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
user_id INTEGER REFERENCES users(id),
|
||||||
|
token TEXT NOT NULL,
|
||||||
|
expires_at TIMESTAMP NOT NULL
|
||||||
|
);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');
|
||||||
|
INSERT INTO users (name, email) VALUES ('Bob', 'bob@example.com');
|
||||||
|
INSERT INTO users (name, email) VALUES ('Charlie', 'charlie@example.com');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Agent Collaboration Test
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
console.log('UI App initialized');
|
||||||
|
export function render() {
|
||||||
|
document.getElementById('app').innerHTML = 'Hello from UI Module v1.0';
|
||||||
|
}
|
||||||
|
// valid update
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
body { font-family: sans-serif; margin: 0; padding: 20px; }
|
||||||
|
#app { color: #333; }
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
console.log('UI App initialized');
|
|
||||||
console.log('UI Module v1.0.0-rc1 - incrementally synced');
|
|
||||||
|
|
||||||
export function render() {
|
|
||||||
document.getElementById('app').innerHTML = 'Hello from UI Module v1.0.0-rc1';
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getVersion() {
|
|
||||||
return '1.0.0-rc1';
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
/* UI Module Styles v1.0.0-rc1 */
|
|
||||||
body { font-family: sans-serif; margin: 0; padding: 20px; background: #f9f9f9; }
|
|
||||||
#app { color: #333; }
|
|
||||||
.header { border-bottom: 2px solid #007bff; padding-bottom: 10px; margin-bottom: 20px; }
|
|
||||||
Reference in New Issue
Block a user