This commit is contained in:
yumoqing 2026-04-16 16:27:27 +08:00
parent cca0434d7c
commit 09fff13dd9
9 changed files with 187 additions and 63 deletions

1
__init__.py Normal file
View File

@ -0,0 +1 @@
# harnessed_reasoning module

19
build.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# harnessed_reasoning build script
set -e
echo "Building harnessed_reasoning module..."
# Get the main application wwwroot directory
MAIN_WWWROOT="/path/to/main/wwwroot"
# Create symbolic links for wwwroot files
for file in wwwroot/*; do
if [ -f "$file" ]; then
filename=$(basename "$file")
ln -sf "$file" "$MAIN_WWWROOT/harnessed_reasoning_$filename"
fi
done
echo "harnessed_reasoning module build completed!"

View File

@ -1,39 +0,0 @@
{
"harnessed_reasoning_sessions_crud": {
"summary": "CRUD operations for reasoning sessions management",
"create": {
"description": "Create and optionally execute a reasoning session",
"parameters": {
"request": {"type": "string", "required": true, "description": "User's natural language request"},
"execute_immediately": {"type": "boolean", "required": false, "default": true, "description": "Whether to execute the plan immediately"}
},
"function": "hermes_reason_and_execute"
},
"read": {
"description": "List reasoning sessions for current user",
"parameters": {
"limit": {"type": "integer", "required": false, "default": 50, "description": "Maximum number of sessions to return"},
"offset": {"type": "integer", "required": false, "default": 0, "description": "Pagination offset"}
},
"function": "hermes_list_reasoning_sessions"
}
},
"harnessed_reasoning_session_detail": {
"summary": "Detailed view of individual reasoning session",
"read": {
"description": "Get detailed reasoning session information",
"parameters": {
"session_id": {"type": "string", "required": true, "description": "Reasoning session ID"}
},
"function": "hermes_get_reasoning_session"
}
},
"harnessed_reasoning_config_view": {
"summary": "View and manage reasoning configuration",
"read": {
"description": "Get current reasoning configuration",
"parameters": {},
"function": "hermes_get_reasoning_config"
}
}
}

View File

@ -1,24 +0,0 @@
{
"harnessed_reasoning_sessions": {
"summary": "Reasoning sessions with execution plans and context awareness",
"fields": {
"id": {"type": "string", "primary_key": true, "description": "Unique reasoning session identifier"},
"user_id": {"type": "string", "required": true, "description": "User ID for multi-user isolation"},
"initial_request": {"type": "text", "required": true, "description": "Original user request"},
"context_summary": {"type": "text", "nullable": true, "description": "Summary of gathered context"},
"execution_plan_json": {"type": "text", "required": true, "description": "JSON-encoded execution plan"},
"reasoning_steps_json": {"type": "text", "nullable": true, "description": "JSON-encoded detailed reasoning steps"},
"safety_violations_json": {"type": "text", "nullable": true, "description": "JSON-encoded safety violations detected"},
"final_decision_json": {"type": "text", "nullable": true, "description": "JSON-encoded final decision metadata"},
"status": {"type": "string", "default": "pending", "description": "Session status: pending, executing, completed, failed, blocked, cancelled"},
"created_at": {"type": "datetime", "required": true, "description": "Creation timestamp"},
"updated_at": {"type": "datetime", "required": true, "description": "Last update timestamp"}
},
"indexes": [
["user_id", "status"],
["user_id", "created_at"],
["status", "created_at"]
],
"codes": {}
}
}

4
init/data.json Normal file
View File

@ -0,0 +1,4 @@
{
"harnessed_reasoning_sessions": [],
"harnessed_reasoning_config": []
}

View File

@ -0,0 +1,11 @@
{
"tblname": "harnessed_reasoning_config",
"alias": "harnessed_reasoning_config_view",
"title": "Reasoning Configuration",
"params": {
"logined_userid": "user_id",
"confidential_fields": [],
"browserfields": {},
"editexclouded": ["id", "user_id", "created_at"]
}
}

View File

@ -0,0 +1,26 @@
{
"tblname": "harnessed_reasoning_sessions",
"alias": "harnessed_reasoning_session_detail",
"title": "Reasoning Session Detail",
"params": {
"sortby": ["created_at desc"],
"logined_userid": "user_id",
"confidential_fields": [],
"browserfields": {
"alters": {
"status": {
"uitype": "code",
"data": [
{"value": "pending", "text": "Pending"},
{"value": "executing", "text": "Executing"},
{"value": "completed", "text": "Completed"},
{"value": "failed", "text": "Failed"},
{"value": "blocked", "text": "Blocked"},
{"value": "cancelled", "text": "Cancelled"}
]
}
}
},
"editexclouded": ["id", "user_id", "created_at", "updated_at"]
}
}

View File

@ -0,0 +1,27 @@
{
"tblname": "harnessed_reasoning_sessions",
"alias": "harnessed_reasoning_sessions_crud",
"title": "Reasoning Sessions Management",
"params": {
"sortby": ["created_at desc"],
"logined_userid": "user_id",
"confidential_fields": [],
"browserfields": {
"exclouded": ["execution_plan_json", "reasoning_steps_json", "safety_violations_json", "final_decision_json"],
"alters": {
"status": {
"uitype": "code",
"data": [
{"value": "pending", "text": "Pending"},
{"value": "executing", "text": "Executing"},
{"value": "completed", "text": "Completed"},
{"value": "failed", "text": "Failed"},
{"value": "blocked", "text": "Blocked"},
{"value": "cancelled", "text": "Cancelled"}
]
}
}
},
"subtables": []
}
}

View File

@ -0,0 +1,99 @@
{
"summary": [
{
"name": "harnessed_reasoning_sessions",
"title": "Reasoning sessions with execution plans and context awareness",
"primary": "id"
}
],
"fields": [
{
"name": "id",
"title": "Unique reasoning session identifier",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "user_id",
"title": "User ID for multi-user isolation",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "initial_request",
"title": "Original user request",
"type": "text",
"nullable": "no"
},
{
"name": "context_summary",
"title": "Summary of gathered context",
"type": "text",
"nullable": "yes"
},
{
"name": "execution_plan_json",
"title": "JSON-encoded execution plan",
"type": "text",
"nullable": "no"
},
{
"name": "reasoning_steps_json",
"title": "JSON-encoded detailed reasoning steps",
"type": "text",
"nullable": "yes"
},
{
"name": "safety_violations_json",
"title": "JSON-encoded safety violations detected",
"type": "text",
"nullable": "yes"
},
{
"name": "final_decision_json",
"title": "JSON-encoded final decision metadata",
"type": "text",
"nullable": "yes"
},
{
"name": "status",
"title": "Session status: pending, executing, completed, failed, blocked, cancelled",
"type": "str",
"length": 20,
"nullable": "no",
"default": "pending"
},
{
"name": "created_at",
"title": "Creation timestamp",
"type": "timestamp",
"nullable": "no"
},
{
"name": "updated_at",
"title": "Last update timestamp",
"type": "timestamp",
"nullable": "no"
}
],
"indexes": [
{
"name": "idx_user_status",
"idxtype": "index",
"idxfields": ["user_id", "status"]
},
{
"name": "idx_user_created",
"idxtype": "index",
"idxfields": ["user_id", "created_at"]
},
{
"name": "idx_status_created",
"idxtype": "index",
"idxfields": ["status", "created_at"]
}
],
"codes": []
}