major changes to message bus, and xml listener
This commit is contained in:
parent
48b4a2b2bd
commit
2e682f8f6d
10 changed files with 30 additions and 52 deletions
|
|
@ -2,7 +2,7 @@
|
|||
First real intelligent listener — classic Grok voice.
|
||||
"""
|
||||
|
||||
from agentserver.listeners.base_llm import LLMPersonality
|
||||
from agentserver.listeners.llm_listener import LLMPersonality
|
||||
from agentserver.prompts.grok_classic import GROK_CLASSIC_MESSAGE
|
||||
|
||||
class GrokPersonality(LLMPersonality):
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from typing import Dict, List
|
|||
from lxml import etree
|
||||
|
||||
from agentserver.xml_listener import XMLListener
|
||||
from agentserver.utils.llm_connection import llm_pool
|
||||
from agentserver.listeners.llm_connection import llm_pool
|
||||
from agentserver.prompts.no_paperclippers import MANIFESTO_MESSAGE
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# agentserver/privileged/models.py
|
||||
from datetime import datetime
|
||||
from typing import Literal, Optional, List
|
||||
from pydantic import BaseModel, Field, AnyUrl
|
||||
|
||||
class RegisterListener(BaseModel):
|
||||
class_path: str = Field(alias="class")
|
||||
description: Optional[str] = None
|
||||
team: Optional[str] = None
|
||||
max_concurrent: Optional[int] = None
|
||||
session_timeout: Optional[int] = None
|
||||
|
||||
class Shutdown(BaseModel):
|
||||
mode: Optional[Literal["graceful", "immediate"]] = None
|
||||
reason: Optional[str] = None
|
||||
|
||||
class RegisterRemoteGateway(BaseModel):
|
||||
url: AnyUrl
|
||||
identity: Optional[str] = None # base64 public key
|
||||
import_tags: Optional[List[str]] = Field(default=None, alias="import-tags")
|
||||
description: Optional[str] = None
|
||||
team: Optional[str] = None
|
||||
max_concurrent: Optional[int] = None
|
||||
|
||||
# Union of all payload types
|
||||
class PrivilegedPayload(BaseModel):
|
||||
__root__: (
|
||||
RegisterListener
|
||||
| Shutdown
|
||||
| RegisterRemoteGateway
|
||||
# ... add the rest
|
||||
)
|
||||
|
||||
class PrivilegedMsgEnvelope(BaseModel):
|
||||
payload: PrivilegedPayload
|
||||
signature: str # base64 Ed25519 signature
|
||||
version: Literal["1.0"] = "1.0"
|
||||
41
structure.md
41
structure.md
|
|
@ -11,34 +11,49 @@ xml-pipeline/
|
|||
│ ├── listeners/
|
||||
│ │ ├── examples/
|
||||
│ │ │ ├── __init__.py
|
||||
│ │ │ └── echo_chamber.py
|
||||
│ │ │ ├── echo_chamber.py
|
||||
│ │ │ └── grok_personality.py
|
||||
│ │ ├── __init__.py
|
||||
│ │ └── base.py
|
||||
│ ├── privileged/
|
||||
│ │ ├── __init__.py
|
||||
│ │ ├── commands.py
|
||||
│ │ ├── models.py
|
||||
│ │ └── msg_listener.py
|
||||
│ │ ├── llm_connection.py
|
||||
│ │ └── llm_listener.py
|
||||
│ ├── prompts/
|
||||
│ │ ├── grok_classic.py
|
||||
│ │ └── no_paperclippers.py
|
||||
│ ├── schema/
|
||||
│ │ └── priviledged-msg.xsd
|
||||
│ │ ├── payloads/
|
||||
│ │ │ └── grok-response.xsd
|
||||
│ │ ├── envelope.xsd
|
||||
│ │ └── privileged-msg.xsd
|
||||
│ ├── utils/
|
||||
│ │ ├── __init__.py
|
||||
│ │ ├── logging_setup.py
|
||||
│ │ └── xml_tools.py
|
||||
│ │ └── message.py
|
||||
│ ├── __init__.py
|
||||
│ ├── agentserver.py
|
||||
│ ├── llm_connection.py
|
||||
│ ├── main.py
|
||||
│ └── message_bus.py
|
||||
│ ├── message_bus.py
|
||||
│ └── xml_listener.py
|
||||
├── docs/
|
||||
│ ├── AgentServer.md
|
||||
│ ├── Local Privilege only.md
|
||||
│ ├── logic and iteration.md
|
||||
│ └── prompt-no-paperclippers.md
|
||||
├── scripts/
|
||||
│ └── generate_organism_key.py
|
||||
├── tests/
|
||||
│ └── __init__.py
|
||||
├── xml_pipeline.egg-info/
|
||||
│ ├── PKG-INFO
|
||||
│ ├── SOURCES.txt
|
||||
│ ├── dependency_links.txt
|
||||
│ ├── requires.txt
|
||||
│ └── top_level.txt
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── README.v0.md
|
||||
├── README.v1.md
|
||||
├── __init__.py
|
||||
├── pyproject.toml
|
||||
├── roadmap.md
|
||||
├── setup-project.ps1
|
||||
└── structure.md
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue