Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4710228
Initial plan
Codex Mar 6, 2026
e03a296
chore: add agents suite export bundle
Codex Mar 6, 2026
69d8b04
Update agents-suite/_shared/src/platform_shared/protocols/health.py
codevantaceo Mar 6, 2026
56cf5a5
Update agents-suite/automation-platform/pyproject.toml
codevantaceo Mar 6, 2026
f767526
chore(eco): regenerate urn/uri + hashlock (sha256) [ci]
Mar 6, 2026
c533b05
Update agents-suite/automation/instant/scripts/organize-instant-files.sh
codevantaceo Mar 6, 2026
cfcc26b
Update agents-suite/automation/instant/gl00-09-stage1-only.json
codevantaceo Mar 6, 2026
2477e37
Update agents-suite/automation/instant/scripts/run-instant-execution.sh
codevantaceo Mar 6, 2026
ec34b6e
Update agents-suite/_shared/src/platform_shared/sandbox/network.py
codevantaceo Mar 6, 2026
30dcaa1
Update agents-suite/automation/instant/scripts/demo_instant_generatio…
codevantaceo Mar 6, 2026
1a0309e
Update agents-suite/automation/instant/scripts/demo_instant_generatio…
codevantaceo Mar 6, 2026
4f339fc
chore(eco): regenerate urn/uri + hashlock (sha256) [ci]
Mar 6, 2026
f888072
Update agents-suite/automation/instant/configs/instant-execution-conf…
codevantaceo Mar 6, 2026
5eec6d3
Update agents-suite/automation/instant/archive/archive-result-2026010…
codevantaceo Mar 6, 2026
6e504f6
Update agents-suite/automation/instant/archive/metadata-20260109-0007…
codevantaceo Mar 6, 2026
2afbdb3
Update agents-suite/automation/instant/docs/pr-validation-INSTANT-TRI…
codevantaceo Mar 6, 2026
3e0627e
Update agents-suite/automation/instant/scripts/run-instant-execution.sh
codevantaceo Mar 6, 2026
9bac0a8
Update agents-suite/automation-platform/src/automation_platform/engin…
codevantaceo Mar 6, 2026
df584a4
chore(eco): regenerate urn/uri + hashlock (sha256) [ci]
Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added agents-suite/Agent_Actions.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions agents-suite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Agents Suite

Consolidated bundle of all existing multi-agent, automation, and AI assets for portable export. Each item preserves its original structure so it can be lifted out independently.

- `backend-ai/` (from `backend/ai`): FastAPI AI inference service with multi-engine routing and governance.
- `_shared/` (from `platforms/_shared`): Shared kernel (engine/event bus/sandbox protocols) used by the platform packages.
- `automation-platform/` (from `platforms/automation-platform`): Python multi-agent pipeline orchestrator and agent pool.
- `automation/` (from `platforms/automation`): Instant execution/organizer manifests, scripts, and docs for automation pipelines.
- `eco-superai/` (from `platforms/eco-superai`): SuperAI platform bundle (ops, infra, artifacts, and source).
- `ng-era-platforms/` (from `platforms/ng-era-platforms`): Legacy multi-agent/runtime archive for backward compatibility.
- `Agent_Actions.zip` (from repository root): Packaged agent action set.

Migration tips:
- Keep `_shared` alongside `automation-platform` so protocol imports (`platform_shared.*`) resolve without modification.
- Each package includes its own README/pyproject/requirements; install or run tests from inside the copied folder as needed.
- To export, zip or copy the entire `agents-suite/` directory.
4 changes: 4 additions & 0 deletions agents-suite/_shared/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent / "src"))
25 changes: 25 additions & 0 deletions agents-suite/_shared/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[build-system]
requires = ["hatchling>=1.21"]
build-backend = "hatchling.build"

[project]
name = "platform-shared"
version = "1.0.0"
description = "Shared kernel — sandbox/container/environment framework and cross-cutting protocols for decentralized platforms."
requires-python = ">=3.11"
license = { text = "Proprietary" }
dependencies = []

[project.optional-dependencies]
dev = ["pytest>=8.3", "pytest-asyncio>=0.24"]

[tool.hatch.build.targets.wheel]
packages = ["src/platform_shared"]

[tool.ruff]
target-version = "py311"
line-length = 100

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
3 changes: 3 additions & 0 deletions agents-suite/_shared/src/platform_shared/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Platform Shared Kernel — sandbox, container, environment framework and protocols."""

__version__ = "1.0.0"
25 changes: 25 additions & 0 deletions agents-suite/_shared/src/platform_shared/domain/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Shared domain primitives."""

from platform_shared.domain.errors import (
PlatformError,
SandboxError,
ContainerError,
EnvironmentError as EnvError,
ResourceExhaustedError,
TimeoutExpiredError,
IsolationViolationError,
)
from platform_shared.domain.platform_id import PlatformId
from platform_shared.domain.version import SemVer

__all__ = [
"PlatformError",
"SandboxError",
"ContainerError",
"EnvError",
"ResourceExhaustedError",
"TimeoutExpiredError",
"IsolationViolationError",
"PlatformId",
"SemVer",
]
68 changes: 68 additions & 0 deletions agents-suite/_shared/src/platform_shared/domain/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
"""Base error hierarchy for the platform ecosystem."""

from __future__ import annotations


class PlatformError(Exception):
"""Root of all platform errors."""

def __init__(self, message: str, *, code: str = "PLATFORM_ERROR", context: dict | None = None):
super().__init__(message)
self.code = code
self.context = context or {}


class SandboxError(PlatformError):
"""Sandbox lifecycle or execution failure."""

def __init__(self, message: str, *, sandbox_id: str = "", **kw):
super().__init__(message, code="SANDBOX_ERROR", **kw)
self.sandbox_id = sandbox_id


class ContainerError(PlatformError):
"""Container runtime failure."""

def __init__(self, message: str, *, container_id: str = "", **kw):
super().__init__(message, code="CONTAINER_ERROR", **kw)
self.container_id = container_id


class EnvironmentError(PlatformError): # noqa: A001 — intentional shadow
"""Environment management failure."""

def __init__(self, message: str, *, env_id: str = "", **kw):
super().__init__(message, code="ENVIRONMENT_ERROR", **kw)
self.env_id = env_id


class ResourceExhaustedError(SandboxError):
"""CPU, memory, or fd limit exceeded inside a sandbox."""

def __init__(self, resource: str, limit: float, actual: float, **kw):
super().__init__(
f"{resource} exhausted: limit={limit}, actual={actual}", code="RESOURCE_EXHAUSTED", **kw
)
self.resource = resource
self.limit = limit
self.actual = actual


class TimeoutExpiredError(SandboxError):
"""Execution exceeded its time budget."""

def __init__(self, timeout_seconds: float, **kw):
super().__init__(
f"Execution timed out after {timeout_seconds}s", code="TIMEOUT_EXPIRED", **kw
)
self.timeout_seconds = timeout_seconds


class IsolationViolationError(SandboxError):
"""An operation attempted to escape its isolation boundary."""

def __init__(self, violation: str, **kw):
super().__init__(
f"Isolation violation: {violation}", code="ISOLATION_VIOLATION", **kw
)
self.violation = violation
33 changes: 33 additions & 0 deletions agents-suite/_shared/src/platform_shared/domain/platform_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""PlatformId — strongly-typed identifier for every platform in the ecosystem."""

from __future__ import annotations

import re
from dataclasses import dataclass

_SLUG_RE = re.compile(r"^[a-z][a-z0-9-]{1,62}[a-z0-9]$")


@dataclass(frozen=True, slots=True)
class PlatformId:
"""Immutable, validated platform identifier.

Format: lowercase alphanumeric slug with hyphens, 3-64 chars.
Examples: ``automation-platform``, ``governance-platform``
"""

value: str

def __post_init__(self) -> None:
if not _SLUG_RE.match(self.value):
raise ValueError(
f"Invalid PlatformId '{self.value}': must be lowercase slug, 3-64 chars"
)

def __str__(self) -> str:
return self.value

@property
def package_name(self) -> str:
"""Python package name (hyphens → underscores)."""
return self.value.replace("-", "_")
43 changes: 43 additions & 0 deletions agents-suite/_shared/src/platform_shared/domain/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""SemVer — semantic versioning value object."""

from __future__ import annotations

import re
from dataclasses import dataclass
from functools import total_ordering

_SEMVER_RE = re.compile(r"^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9.]+))?$")


@total_ordering
@dataclass(frozen=True, slots=True)
class SemVer:
major: int
minor: int
patch: int
pre: str = ""

@classmethod
def parse(cls, text: str) -> SemVer:
m = _SEMVER_RE.match(text)
if not m:
raise ValueError(f"Invalid semver: {text}")
return cls(int(m[1]), int(m[2]), int(m[3]), m[4] or "")

def __str__(self) -> str:
base = f"{self.major}.{self.minor}.{self.patch}"
return f"{base}-{self.pre}" if self.pre else base

def __lt__(self, other: object) -> bool:
if not isinstance(other, SemVer):
return NotImplemented
return (self.major, self.minor, self.patch) < (other.major, other.minor, other.patch)

def bump_patch(self) -> SemVer:
return SemVer(self.major, self.minor, self.patch + 1)

def bump_minor(self) -> SemVer:
return SemVer(self.major, self.minor + 1, 0)

def bump_major(self) -> SemVer:
return SemVer(self.major + 1, 0, 0)
19 changes: 19 additions & 0 deletions agents-suite/_shared/src/platform_shared/protocols/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Cross-cutting protocols — every platform engine must satisfy these."""

from platform_shared.protocols.engine import Engine, EngineStatus
from platform_shared.protocols.event_bus import EventBus, Event, EventHandler
from platform_shared.protocols.health import HealthCheck, HealthStatus, HealthReport
from platform_shared.protocols.lifecycle import Lifecycle, LifecycleState

__all__ = [
"Engine",
"EngineStatus",
"EventBus",
"Event",
"EventHandler",
"HealthCheck",
"HealthStatus",
"HealthReport",
"Lifecycle",
"LifecycleState",
]
32 changes: 32 additions & 0 deletions agents-suite/_shared/src/platform_shared/protocols/engine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Engine protocol — the universal contract for all platform engines."""

from __future__ import annotations

from enum import Enum
from typing import Any, Protocol, runtime_checkable


class EngineStatus(str, Enum):
IDLE = "idle"
STARTING = "starting"
RUNNING = "running"
STOPPING = "stopping"
STOPPED = "stopped"
ERROR = "error"


@runtime_checkable
class Engine(Protocol):
"""Every platform engine implements this interface."""

@property
def name(self) -> str: ...

@property
def status(self) -> EngineStatus: ...

async def start(self) -> None: ...

async def stop(self) -> None: ...

async def execute(self, payload: dict[str, Any]) -> dict[str, Any]: ...
52 changes: 52 additions & 0 deletions agents-suite/_shared/src/platform_shared/protocols/event_bus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"""Event bus protocol — decentralized, async event communication between platforms."""

from __future__ import annotations

import time
import uuid
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Any, Awaitable, Callable, Protocol, runtime_checkable


@dataclass(frozen=True, slots=True)
class Event:
topic: str
payload: dict[str, Any]
event_id: str = field(default_factory=lambda: uuid.uuid4().hex[:16])
source: str = ""
timestamp: float = field(default_factory=time.time)

EventHandler = Callable[[Event], Awaitable[None]]


@runtime_checkable
class EventBus(Protocol):
async def publish(self, event: Event) -> None: ...
def subscribe(self, topic: str, handler: EventHandler) -> None: ...
def unsubscribe(self, topic: str, handler: EventHandler) -> None: ...


class LocalEventBus:
"""In-process event bus (single-node, for dev/test)."""

def __init__(self) -> None:
self._handlers: dict[str, list[EventHandler]] = defaultdict(list)
self._history: list[Event] = []

async def publish(self, event: Event) -> None:
self._history.append(event)
for handler in self._handlers.get(event.topic, []):
await handler(event)

def subscribe(self, topic: str, handler: EventHandler) -> None:
self._handlers[topic].append(handler)

def unsubscribe(self, topic: str, handler: EventHandler) -> None:
handlers = self._handlers.get(topic, [])
if handler in handlers:
handlers.remove(handler)

@property
def history(self) -> list[Event]:
return list(self._history)
36 changes: 36 additions & 0 deletions agents-suite/_shared/src/platform_shared/protocols/health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Health check protocol — liveness / readiness for every component."""

from __future__ import annotations

import time
from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Protocol, runtime_checkable


class HealthStatus(str, Enum):
HEALTHY = "healthy"
DEGRADED = "degraded"
UNHEALTHY = "unhealthy"
UNKNOWN = "unknown"


@dataclass(frozen=True, slots=True)
class HealthReport:
component: str
status: HealthStatus
message: str = ""
details: dict[str, Any] = field(default_factory=dict)
checked_at: float = field(default_factory=time.time)
latency_ms: float = 0.0

@property
def is_healthy(self) -> bool:
return self.status in (HealthStatus.HEALTHY, HealthStatus.DEGRADED)


@runtime_checkable
class HealthCheck(Protocol):
async def check_health(self) -> HealthReport: ...
async def check_readiness(self) -> bool: ...
async def check_liveness(self) -> bool: ...
Loading