add design style
This commit is contained in:
parent
09fff13dd9
commit
eb28ba57b9
@ -1 +0,0 @@
|
||||
# harnessed_reasoning module
|
||||
47
build.sh
47
build.sh
@ -1,19 +1,52 @@
|
||||
#!/bin/bash
|
||||
# harnessed_reasoning build script
|
||||
# Follows module-development-spec: processes models/, json/, and wwwroot/
|
||||
|
||||
set -e
|
||||
|
||||
echo "Building harnessed_reasoning module..."
|
||||
MODULE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
MODULE_NAME="harnessed_reasoning"
|
||||
|
||||
# Get the main application wwwroot directory
|
||||
MAIN_WWWROOT="/path/to/main/wwwroot"
|
||||
echo "Building ${MODULE_NAME} module..."
|
||||
|
||||
# Create symbolic links for wwwroot files
|
||||
for file in wwwroot/*; do
|
||||
# Step 1: Generate DDL from model JSON files
|
||||
if [ -d "$MODULE_DIR/models" ] && ls "$MODULE_DIR/models"/*.json 1>/dev/null 2>&1; then
|
||||
echo "Generating DDL from model definitions..."
|
||||
cd "$MODULE_DIR/models"
|
||||
if command -v json2ddl &>/dev/null; then
|
||||
json2ddl mysql . > mysql.ddl.sql
|
||||
echo "Generated mysql.ddl.sql from models/"
|
||||
else
|
||||
echo "Warning: json2ddl not found, skipping DDL generation"
|
||||
fi
|
||||
cd "$MODULE_DIR"
|
||||
fi
|
||||
|
||||
# Step 2: Generate CRUD UI from JSON definitions
|
||||
if [ -d "$MODULE_DIR/json" ] && ls "$MODULE_DIR/json"/*.json 1>/dev/null 2>&1; then
|
||||
echo "Generating CRUD UI files from JSON definitions..."
|
||||
cd "$MODULE_DIR/json"
|
||||
if command -v xls2ui &>/dev/null; then
|
||||
for f in *.json; do
|
||||
xls2ui -m ../models -o ../wwwroot "${MODULE_NAME}" "$f" 2>/dev/null || true
|
||||
done
|
||||
echo "Generated CRUD UI files in wwwroot/"
|
||||
else
|
||||
echo "Warning: xls2ui not found, skipping UI generation"
|
||||
fi
|
||||
cd "$MODULE_DIR"
|
||||
fi
|
||||
|
||||
# Step 3: Link wwwroot files to main application wwwroot
|
||||
MAIN_WWWROOT="$MODULE_DIR/../wwwroot"
|
||||
mkdir -p "$MAIN_WWWROOT"
|
||||
|
||||
for file in "$MODULE_DIR"/wwwroot/*; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file")
|
||||
ln -sf "$file" "$MAIN_WWWROOT/harnessed_reasoning_$filename"
|
||||
ln -sf "$file" "$MAIN_WWWROOT/${MODULE_NAME}_${filename}"
|
||||
echo "Linked $filename to main wwwroot"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "harnessed_reasoning module build completed!"
|
||||
echo "${MODULE_NAME} module build completed successfully!"
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
from ahserver.serverenv import ServerEnv
|
||||
from .core import (
|
||||
hermes_reason_and_execute,
|
||||
hermes_get_reasoning_session,
|
||||
hermes_list_reasoning_sessions,
|
||||
hermes_get_reasoning_config
|
||||
)
|
||||
|
||||
def load_harnessed_reasoning():
|
||||
env = ServerEnv()
|
||||
env.hermes_reason_and_execute = hermes_reason_and_execute
|
||||
env.hermes_get_reasoning_session = hermes_get_reasoning_session
|
||||
env.hermes_list_reasoning_sessions = hermes_list_reasoning_sessions
|
||||
env.hermes_get_reasoning_config = hermes_get_reasoning_config
|
||||
@ -1,4 +1,33 @@
|
||||
{
|
||||
"harnessed_reasoning_sessions": [],
|
||||
"harnessed_reasoning_config": []
|
||||
"harnessed_reasoning_config": [
|
||||
{
|
||||
"id": "default_config_user_1",
|
||||
"user_id": "user_1",
|
||||
"max_reasoning_steps": 10,
|
||||
"max_tool_calls_per_step": 5,
|
||||
"enable_cross_session_search": "1",
|
||||
"enable_skill_auto_loading": "1",
|
||||
"safety_mode": "strict",
|
||||
"max_context_tokens": 4000,
|
||||
"enable_error_recovery": "1",
|
||||
"max_recovery_attempts": 3,
|
||||
"created_at": "2026-04-20 10:45:00",
|
||||
"updated_at": "2026-04-20 10:45:00"
|
||||
},
|
||||
{
|
||||
"id": "default_config_user_2",
|
||||
"user_id": "user_2",
|
||||
"max_reasoning_steps": 10,
|
||||
"max_tool_calls_per_step": 5,
|
||||
"enable_cross_session_search": "1",
|
||||
"enable_skill_auto_loading": "1",
|
||||
"safety_mode": "moderate",
|
||||
"max_context_tokens": 4000,
|
||||
"enable_error_recovery": "1",
|
||||
"max_recovery_attempts": 3,
|
||||
"created_at": "2026-04-20 10:45:00",
|
||||
"updated_at": "2026-04-20 10:45:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -5,7 +5,39 @@
|
||||
"params": {
|
||||
"logined_userid": "user_id",
|
||||
"confidential_fields": [],
|
||||
"browserfields": {},
|
||||
"browserfields": {
|
||||
"alters": {
|
||||
"enable_cross_session_search": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "1", "text": "Enabled"},
|
||||
{"value": "0", "text": "Disabled"}
|
||||
]
|
||||
},
|
||||
"enable_skill_auto_loading": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "1", "text": "Enabled"},
|
||||
{"value": "0", "text": "Disabled"}
|
||||
]
|
||||
},
|
||||
"enable_error_recovery": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "1", "text": "Enabled"},
|
||||
{"value": "0", "text": "Disabled"}
|
||||
]
|
||||
},
|
||||
"safety_mode": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "strict", "text": "Strict"},
|
||||
{"value": "moderate", "text": "Moderate"},
|
||||
{"value": "lenient", "text": "Lenient"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"editexclouded": ["id", "user_id", "created_at"]
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
"logined_userid": "user_id",
|
||||
"confidential_fields": [],
|
||||
"browserfields": {
|
||||
"exclouded": ["id", "user_id", "created_at", "updated_at"],
|
||||
"alters": {
|
||||
"status": {
|
||||
"uitype": "code",
|
||||
|
||||
@ -1,30 +1,26 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=45", "wheel"]
|
||||
requires = ["setuptools>=61", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "harnessed_reasoning"
|
||||
name = "harnessed-reasoning"
|
||||
version = "1.0.0"
|
||||
description = "Hermes Reasoning Module - Production-ready reasoning engine with full context awareness"
|
||||
authors = [{name = "Hermes AI Team"}]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
]
|
||||
description = "Hermes Reasoning Engine module - advanced reasoning with context awareness, safety checks, and error recovery"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"ahserver>=1.0.0",
|
||||
"appPublic>=1.0.0",
|
||||
"sqlor-database-module>=1.0.0",
|
||||
"harnessed_agent>=1.0.0"
|
||||
"ahserver",
|
||||
"sqlor",
|
||||
"apppublic",
|
||||
"appbase",
|
||||
"rbac",
|
||||
"harnessed-agent",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest",
|
||||
"pytest-asyncio",
|
||||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["harnessed_reasoning*"]
|
||||
@ -1,21 +1,58 @@
|
||||
{
|
||||
"widgettype": "tabs",
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"tabs": [
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"css": ""
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"title": "Reasoning Sessions",
|
||||
"url": "{{entire_url(harnessed_reasoning_sessions_crud)}}"
|
||||
"widgettype": "Toolbar",
|
||||
"options": {
|
||||
"css": "ios-navbar",
|
||||
"items": [
|
||||
{
|
||||
"widgettype": "Label",
|
||||
"text": "Reasoning Engine",
|
||||
"options": {
|
||||
"css": "ios-navbar-title"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Session Details",
|
||||
"url": "{{entire_url(harnessed_reasoning_session_detail)}}"
|
||||
},
|
||||
{
|
||||
"title": "Configuration",
|
||||
"url": "{{entire_url(harnessed_reasoning_config_view)}}"
|
||||
"widgettype": "Label",
|
||||
"text": "Manage sessions and system configuration",
|
||||
"options": {
|
||||
"css": "ios-navbar-subtitle"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"subwidgets": [],
|
||||
"binds": []
|
||||
{
|
||||
"widgettype": "Tab",
|
||||
"options": {
|
||||
"tabs": [
|
||||
{"title": "Sessions", "icon": "history"},
|
||||
{"title": "Configuration", "icon": "settings"}
|
||||
],
|
||||
"css": "ios-tabbar"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"options": {
|
||||
"url": "{{entire_url(harnessed_reasoning_sessions_crud)}}",
|
||||
"css": "ios-card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"options": {
|
||||
"url": "{{entire_url(harnessed_reasoning_config_view)}}",
|
||||
"css": "ios-card"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user