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.
|
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
|
from agentserver.prompts.grok_classic import GROK_CLASSIC_MESSAGE
|
||||||
|
|
||||||
class GrokPersonality(LLMPersonality):
|
class GrokPersonality(LLMPersonality):
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ from typing import Dict, List
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from agentserver.xml_listener import XMLListener
|
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
|
from agentserver.prompts.no_paperclippers import MANIFESTO_MESSAGE
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
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/
|
│ ├── listeners/
|
||||||
│ │ ├── examples/
|
│ │ ├── examples/
|
||||||
│ │ │ ├── __init__.py
|
│ │ │ ├── __init__.py
|
||||||
│ │ │ └── echo_chamber.py
|
│ │ │ ├── echo_chamber.py
|
||||||
|
│ │ │ └── grok_personality.py
|
||||||
│ │ ├── __init__.py
|
│ │ ├── __init__.py
|
||||||
│ │ └── base.py
|
│ │ ├── llm_connection.py
|
||||||
│ ├── privileged/
|
│ │ └── llm_listener.py
|
||||||
│ │ ├── __init__.py
|
│ ├── prompts/
|
||||||
│ │ ├── commands.py
|
│ │ ├── grok_classic.py
|
||||||
│ │ ├── models.py
|
│ │ └── no_paperclippers.py
|
||||||
│ │ └── msg_listener.py
|
|
||||||
│ ├── schema/
|
│ ├── schema/
|
||||||
│ │ └── priviledged-msg.xsd
|
│ │ ├── payloads/
|
||||||
|
│ │ │ └── grok-response.xsd
|
||||||
|
│ │ ├── envelope.xsd
|
||||||
|
│ │ └── privileged-msg.xsd
|
||||||
│ ├── utils/
|
│ ├── utils/
|
||||||
│ │ ├── __init__.py
|
│ │ ├── __init__.py
|
||||||
│ │ ├── logging_setup.py
|
│ │ └── message.py
|
||||||
│ │ └── xml_tools.py
|
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ ├── agentserver.py
|
│ ├── agentserver.py
|
||||||
│ ├── llm_connection.py
|
|
||||||
│ ├── main.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/
|
├── scripts/
|
||||||
│ └── generate_organism_key.py
|
│ └── generate_organism_key.py
|
||||||
├── tests/
|
├── tests/
|
||||||
│ └── __init__.py
|
│ └── __init__.py
|
||||||
|
├── xml_pipeline.egg-info/
|
||||||
|
│ ├── PKG-INFO
|
||||||
|
│ ├── SOURCES.txt
|
||||||
|
│ ├── dependency_links.txt
|
||||||
|
│ ├── requires.txt
|
||||||
|
│ └── top_level.txt
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
├── README.md
|
├── README.md
|
||||||
|
├── README.v0.md
|
||||||
|
├── README.v1.md
|
||||||
├── __init__.py
|
├── __init__.py
|
||||||
├── pyproject.toml
|
├── pyproject.toml
|
||||||
├── roadmap.md
|
|
||||||
├── setup-project.ps1
|
├── setup-project.ps1
|
||||||
└── structure.md
|
└── structure.md
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue