=== REPOSITORY GUARD === Branch: main HEAD: ad99844402cf3d27c85cee5223c03cabc79aebca Existing working-tree entries: 60 No files will be modified. === SAFE JSON STRUCTURES === --- /home/shire3d/ARMOR/config/agents/registry.json --- { "schemaVersion": 1, "generatedFor": "SHiRE Mini", "orchestrator": "shire-central", "agentHubUrl": "http://100.116.93.90:8770", "agents": [ { "schemaVersion": 1, "id": "marketing-boss", "name": "Marketing Boss", "category": "Growth and Commerce", "route": "/agents/marketing-boss", "localUrl": "http://100.116.93.90:4173", "description": "Builds SHIRE3D marketing strategy, synchronises approved public product listings and prepares customer-facing campaigns for Ray to review.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": true, "status": "READY_FOR_LOCAL_DRAFTING", "appPath": "agents/apps/marketing-boss", "brandBoundary": "SHIRE3D_ONLY", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/marketing-boss/working", "persistent": "data/agents/marketing-boss/memory", "tasks": "data/agents/marketing-boss/tasks", "evidence": "data/agents/marketing-boss/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true, "networkAccess": "PRIVATE_TAILNET" }, { "schemaVersion": 1, "id": "flexiforge", "name": "FlexiForge Articulation Agent", "category": "Design and Manufacture", "route": "/agents/flexiforge", "localUrl": null, "description": "Plans and creates approval-gated articulated or fidget conversions from supplied 3D geometry.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_DEPENDENCIES_AND_FORGE_VALIDATION_REQUIRED", "appPath": "agents/apps/flexiforge", "brandBoundary": "SHIRE3D", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/flexiforge/working", "persistent": "data/agents/flexiforge/memory", "tasks": "data/agents/flexiforge/tasks", "evidence": "data/agents/flexiforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true }, { "schemaVersion": 1, "id": "scanforge", "name": "ScanForge Scanner Agent", "category": "Design and Capture", "route": "/agents/scanforge", "localUrl": null, "description": "Coordinates Kinect capture, calibration, reconstruction, measurements and verified scan handoff.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "FRONTEND_READY_SCAN_BRIDGE_AND_HARDWARE_TESTS_REQUIRED", "appPath": "agents/apps/scanforge", "brandBoundary": "SHIRE", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/scanforge/working", "persistent": "data/agents/scanforge/memory", "tasks": "data/agents/scanforge/tasks", "evidence": "data/agents/scanforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true }, { "schemaVersion": 1, "id": "store-doctor", "name": "Store Doctor", "category": "Commerce and Listings", "route": "/agents/store-doctor", "localUrl": null, "description": "Audits SHIRE3D products, listings, pricing, profitability and catalogue health, then recommends specific repairs.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_SPECIALIST_LAYER_REQUIRED", "appPath": "agents/apps/store-doctor-foundation", "brandBoundary": "SHIRE3D_ONLY", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/store-doctor/working", "persistent": "data/agents/store-doctor/memory", "tasks": "data/agents/store-doctor/tasks", "evidence": "data/agents/store-doctor/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true }, { "schemaVersion": 1, "id": "limbforge", "name": "LimbForge", "category": "Prosthetic Cover Design", "route": "/agents/limbforge", "localUrl": null, "description": "Designs non-load-bearing cosmetic prosthetic covers using verified measurements, clearances and safety gates.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_BASE44_ADAPTER_REPLACEMENT_REQUIRED", "appPath": "agents/apps/limbforge", "brandBoundary": "SHIRE", "modules": [ "ossiguard" ], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/limbforge/working", "persistent": "data/agents/limbforge/memory", "tasks": "data/agents/limbforge/tasks", "evidence": "data/agents/limbforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true }, { "schemaVersion": 1, "id": "covercanvas", "name": "CoverCanvas", "category": "Artwork and Surface Design", "route": "/agents/covercanvas", "localUrl": null, "description": "Creates reusable cover-independent artwork layers and applies them to validated cover geometry.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_BASE44_REMOVAL_AND_GEOMETRY_ENGINE_REQUIRED", "appPath": "agents/apps/covercanvas", "brandBoundary": "SHIRE", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/covercanvas/working", "persistent": "data/agents/covercanvas/memory", "tasks": "data/agents/covercanvas/tasks", "evidence": "data/agents/covercanvas/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } ], "privateNetworkAccess": { "mode": "tailscale_socket_proxy", "agentHub": "http://100.116.93.90:8770", "marketingBoss": "http://100.116.93.90:4173", "publicInternetExposure": false } } --- /home/shire3d/ARMOR/config/agents/modules-registry.json --- { "schemaVersion": 1, "modules": [ { "schemaVersion": 1, "id": "dental-studio", "name": "SHiRE Dental Studio", "type": "safety_gated_product_module", "route": "/forge/dental-studio", "appPath": "modules/dental-studio", "agent": null, "status": "STAGED_NOT_CLINICALLY_OR_COMMERCIALLY_RELEASE_READY", "safety": { "realPatientData": false, "clinicalManufacturing": false, "professionalClaims": false }, "note": "Installed as a separate product/module, not activated as a specialist Agent." } ] } --- /home/shire3d/ARMOR/data/agents/install-state.json --- { "version": "0.1.0", "installedAt": "2026-07-26T08:21:52.913172+00:00", "backupDir": "/SHiREVault/Backup/OSBackups/SHIRE-MINI-AGENTS-PRE-INSTALL-20260726T082146Z", "serviceUser": "ray", "marketingFirstRunExitCode": 0, "activeAgents": [ "marketing-boss" ], "stagedAgents": [ "flexiforge", "scanforge", "store-doctor", "limbforge", "covercanvas" ], "modules": [ "dental-studio" ], "ossiguard": "limbforge-module-not-top-level-agent" } --- /home/shire3d/ARMOR/agents/definitions/marketing-boss/agent.manifest.json --- { "schemaVersion": 1, "id": "marketing-boss", "name": "Marketing Boss", "category": "Growth and Commerce", "route": "/agents/marketing-boss", "localUrl": "http://127.0.0.1:4173", "description": "Builds SHIRE3D marketing strategy, synchronises approved public product listings and prepares customer-facing campaigns for Ray to review.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": true, "status": "READY_FOR_LOCAL_DRAFTING", "appPath": "agents/apps/marketing-boss", "capabilities": [ "catalogue.read_public", "campaign.plan", "copy.draft", "content.schedule_propose", "performance.analyse" ], "blockedActions": [ "publish_live", "spend_money", "use_credentials_without_consent", "message_customers", "change_accounts" ], "brandBoundary": "SHIRE3D_ONLY", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/marketing-boss/working", "persistent": "data/agents/marketing-boss/memory", "tasks": "data/agents/marketing-boss/tasks", "evidence": "data/agents/marketing-boss/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } --- /home/shire3d/ARMOR/agents/definitions/scanforge/agent.manifest.json --- { "schemaVersion": 1, "id": "scanforge", "name": "ScanForge Scanner Agent", "category": "Design and Capture", "route": "/agents/scanforge", "localUrl": null, "description": "Coordinates Kinect capture, calibration, reconstruction, measurements and verified scan handoff.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "FRONTEND_READY_SCAN_BRIDGE_AND_HARDWARE_TESTS_REQUIRED", "appPath": "agents/apps/scanforge", "capabilities": [ "scanner.status", "scan.plan", "capture.coordinate", "mesh.handoff" ], "blockedActions": [ "fake_hardware_ready", "medical_certification", "socket_or_implant_geometry", "forge_auto_unlock" ], "brandBoundary": "SHIRE", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/scanforge/working", "persistent": "data/agents/scanforge/memory", "tasks": "data/agents/scanforge/tasks", "evidence": "data/agents/scanforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } --- /home/shire3d/ARMOR/agents/definitions/store-doctor/agent.manifest.json --- { "schemaVersion": 1, "id": "store-doctor", "name": "Store Doctor", "category": "Commerce and Listings", "route": "/agents/store-doctor", "localUrl": null, "description": "Audits SHIRE3D products, listings, pricing, profitability and catalogue health, then recommends specific repairs.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_SPECIALIST_LAYER_REQUIRED", "appPath": "agents/apps/store-doctor-foundation", "capabilities": [ "listing.audit", "catalogue.health", "pricing.review", "profitability.estimate", "repair.plan" ], "blockedActions": [ "change_live_listing_without_approval", "use_store_credentials_without_consent", "refund_or_message_customer" ], "brandBoundary": "SHIRE3D_ONLY", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/store-doctor/working", "persistent": "data/agents/store-doctor/memory", "tasks": "data/agents/store-doctor/tasks", "evidence": "data/agents/store-doctor/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } --- /home/shire3d/ARMOR/agents/definitions/covercanvas/agent.manifest.json --- { "schemaVersion": 1, "id": "covercanvas", "name": "CoverCanvas", "category": "Artwork and Surface Design", "route": "/agents/covercanvas", "localUrl": null, "description": "Creates reusable cover-independent artwork layers and applies them to validated cover geometry.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_BASE44_REMOVAL_AND_GEOMETRY_ENGINE_REQUIRED", "appPath": "agents/apps/covercanvas", "capabilities": [ "artwork.plan", "mask.create", "relief.intent", "placement.propose" ], "blockedActions": [ "claim_simulation_is_geometry", "export_unvalidated_cover", "overwrite_master_artwork" ], "brandBoundary": "SHIRE", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/covercanvas/working", "persistent": "data/agents/covercanvas/memory", "tasks": "data/agents/covercanvas/tasks", "evidence": "data/agents/covercanvas/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } --- /home/shire3d/ARMOR/agents/definitions/limbforge/agent.manifest.json --- { "schemaVersion": 1, "id": "limbforge", "name": "LimbForge", "category": "Prosthetic Cover Design", "route": "/agents/limbforge", "localUrl": null, "description": "Designs non-load-bearing cosmetic prosthetic covers using verified measurements, clearances and safety gates.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_BASE44_ADAPTER_REPLACEMENT_REQUIRED", "appPath": "agents/apps/limbforge", "capabilities": [ "cover.plan", "measurement.validate", "component.envelope", "manufacturing.prepare" ], "blockedActions": [ "load_bearing_design", "socket_design", "implant_contact_geometry", "medical_certification", "export_without_validation" ], "brandBoundary": "SHIRE", "modules": [ "ossiguard" ], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/limbforge/working", "persistent": "data/agents/limbforge/memory", "tasks": "data/agents/limbforge/tasks", "evidence": "data/agents/limbforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } --- /home/shire3d/ARMOR/agents/definitions/flexiforge/agent.manifest.json --- { "schemaVersion": 1, "id": "flexiforge", "name": "FlexiForge Articulation Agent", "category": "Design and Manufacture", "route": "/agents/flexiforge", "localUrl": null, "description": "Plans and creates approval-gated articulated or fidget conversions from supplied 3D geometry.", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "enabled": false, "status": "STAGED_DEPENDENCIES_AND_FORGE_VALIDATION_REQUIRED", "appPath": "agents/apps/flexiforge", "capabilities": [ "mesh.inspect", "joint.suggest", "clearance.plan", "forge.prepare" ], "blockedActions": [ "export_without_second_approval", "claim_printability_without_tests", "create_harmful_designs" ], "brandBoundary": "SHIRE3D", "modules": [], "brain": { "type": "dedicated_scoped_logical_brain", "fastModel": "qwen3:1.7b", "deepModel": "qwen3:8b", "centralOrchestrator": "shire-central", "memoryIsolation": "default", "crossAgentSharing": "explicit-through-shire" }, "memory": { "working": "data/agents/flexiforge/working", "persistent": "data/agents/flexiforge/memory", "tasks": "data/agents/flexiforge/tasks", "evidence": "data/agents/flexiforge/evidence" }, "health": { "reporting": true, "capabilityEvidenceRequired": true }, "externalActionApprovalRequired": true } === AGENT HUB STRUCTURE === File: /home/shire3d/ARMOR/agents/runtime/agent_hub.py Lines: 352 --- Classes and functions --- 0040: FunctionDef: now_iso 0044: FunctionDef: read_json 0051: FunctionDef: atomic_write_json 0058: FunctionDef: registry 0063: FunctionDef: agents 0068: FunctionDef: agent_by_id 0072: FunctionDef: contract_for 0080: FunctionDef: http_json 0102: FunctionDef: ollama_models 0109: FunctionDef: model_available 0116: FunctionDef: vault_status 0142: FunctionDef: service_health 0158: FunctionDef: agent_status 0187: FunctionDef: queue_task 0207: FunctionDef: chat 0247: FunctionDef: dashboard 0262: ClassDef: Handler 0334: FunctionDef: main 0265: FunctionDef: log_message 0268: FunctionDef: _send_json 0278: FunctionDef: _read_json 0291: FunctionDef: do_GET 0314: FunctionDef: do_POST --- Relevant implementation excerpts --- 0001: #!/usr/bin/env python3 0002: """SHiRE Agent Hub candidate: local-only registry, health, scoped chat and task queues.""" 0003: from __future__ import annotations 0004: 0005: import argparse 0006: import datetime as dt 0007: import hashlib 0008: import html 0009: import json 0010: import os 0011: from pathlib import Path 0012: import re 0013: import subprocess 0014: import threading 0015: import urllib.error 0016: import urllib.request 0017: from http import HTTPStatus 0018: from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer 0019: from typing import Any 0020: 0021: ROOT = Path(os.environ.get("SHIRE_ROOT", "/home/shire3d/ARMOR")).resolve() 0022: REGISTRY_FILE = Path(os.environ.get("SHIRE_AGENT_REGISTRY", ROOT / "config/agents/registry.json")) 0023: AGENTS_ROOT = Path(os.environ.get("SHIRE_AGENTS_ROOT", ROOT / "agents/definitions")) 0024: DATA_ROOT = Path(os.environ.get("SHIRE_AGENT_DATA", ROOT / "data/agents")) 0025: VAULT_ROOT = Path(os.environ.get("SHIRE_VAULT", "/SHiREVault")) 0026: OLLAMA_URL = os.environ.get("OLLAMA_URL", "http://127.0.0.1:11434").rstrip("/") 0027: MARKETING_URL = os.environ.get("MARKETING_BOSS_URL", "http://127.0.0.1:4173").rstrip("/") 0028: HOST = os.environ.get("SHIRE_AGENT_HUB_HOST", "127.0.0.1") 0029: PORT = int(os.environ.get("SHIRE_AGENT_HUB_PORT", "8770")) 0030: MAX_BODY = 1_000_000 0031: LOCK = threading.RLock() ... 0033: SENSITIVE_RE = re.compile(r"(?i)(password|secret|api[_ -]?key|access[_ -]?token|refresh[_ -]?token)\s*[:=]\s*\S+") 0034: EXTERNAL_ACTION_RE = re.compile( 0035: r"(?i)\b(publish|post live|send to customer|message customer|spend|buy ads?|launch ads?|" 0036: r"change credentials?|enter password|connect account|delete|refund|charge|email customers?)\b" 0037: ) ... 0056: 0057: 0058: def registry() -> dict[str, Any]: 0059: value = read_json(REGISTRY_FILE, {}) 0060: return value if isinstance(value, dict) else {} 0061: 0062: 0063: def agents() -> list[dict[str, Any]]: 0064: value = registry().get("agents", []) 0065: return value if isinstance(value, list) else [] 0066: 0067: 0068: def agent_by_id(agent_id: str) -> dict[str, Any] | None: 0069: return next((item for item in agents() if item.get("id") == agent_id), None) 0070: 0071: 0072: def contract_for(agent_id: str) -> str: 0073: path = AGENTS_ROOT / agent_id / "SYSTEM_CONTRACT.md" 0074: try: 0075: return path.read_text(encoding="utf-8") 0076: except OSError: 0077: return "You are a scoped SHiRE specialist. Report missing evidence and stop before external actions." 0078: 0079: 0080: def http_json(url: str, method: str = "GET", payload: Any = None, timeout: float = 4.0) -> tuple[int, Any]: 0081: data = None 0082: headers = {"Accept": "application/json"} ... 0084: data = json.dumps(payload).encode("utf-8") 0085: headers["Content-Type"] = "application/json" 0086: req = urllib.request.Request(url, data=data, method=method, headers=headers) 0087: try: 0088: with urllib.request.urlopen(req, timeout=timeout) as response: 0089: raw = response.read(MAX_BODY) 0090: return response.status, json.loads(raw.decode("utf-8")) 0091: except urllib.error.HTTPError as exc: 0092: raw = exc.read(MAX_BODY) 0093: try: ... 0101: 0102: def ollama_models() -> list[str]: 0103: status, payload = http_json(f"{OLLAMA_URL}/api/tags", timeout=2.0) 0104: if status != 200: 0105: return [] 0106: return [str(item.get("name")) for item in payload.get("models", []) if item.get("name")] ... 0114: 0115: 0116: def vault_status() -> dict[str, Any]: 0117: mounted = False 0118: writable = False 0119: filesystem = "" 0120: try: 0121: proc = subprocess.run(["findmnt", "-n", "-o", "FSTYPE", "-T", str(VAULT_ROOT)], capture_output=True, text=True, timeout=3) 0122: mounted = proc.returncode == 0 0123: filesystem = proc.stdout.strip() ... 0146: "service": "shire-agent-hub", 0147: "version": "0.1.0", 0148: "boundTo": f"{HOST}:{PORT}", 0149: "publicInboundPorts": False, 0150: "registry": str(REGISTRY_FILE), 0151: "agentCount": len(agents()), 0152: "ollama": {"url": OLLAMA_URL, "online": bool(installed), "models": installed}, 0153: "shireVault": vault_status(), 0154: "time": now_iso(), 0155: } 0156: 0157: 0158: def agent_status(item: dict[str, Any]) -> dict[str, Any]: 0159: installed = ollama_models() 0160: fast = item.get("brain", {}).get("fastModel") or item.get("fastModel") 0161: deep = item.get("brain", {}).get("deepModel") or item.get("deepModel") 0162: status = { 0163: "id": item.get("id"), 0164: "name": item.get("name"), 0165: "declaredStatus": item.get("status"), 0166: "enabled": bool(item.get("enabled")), 0167: "route": item.get("route"), 0168: "localUrl": item.get("localUrl"), 0169: "brain": { 0170: "fastModel": fast, ... 0180: } 0181: if item.get("id") == "marketing-boss": 0182: code, value = http_json(f"{MARKETING_URL}/api/health", timeout=2.0) 0183: status["application"] = {"online": code == 200 and bool(value.get("ok")), "health": value if code else None, "error": value.get("error") if isinstance(value, dict) else None} 0184: return status 0185: 0186: ... 0217: if EXTERNAL_ACTION_RE.search(message): 0218: system += "\nThe current request appears to involve an external, financial, credential-sensitive, destructive or public action. Prepare a proposal only and explicitly mark it AWAITING_RAY_APPROVAL. Do not claim the action happened." 0219: status, result = http_json( 0220: f"{OLLAMA_URL}/api/chat", 0221: method="POST", 0222: payload={ ... 0231: timeout=180.0, 0232: ) 0233: if status != 200: 0234: raise RuntimeError(f"Ollama request failed: {result.get('error', 'unknown error')}") 0235: text = str((result.get("message") or {}).get("content") or "").strip() ... 0247: def dashboard() -> str: 0248: cards = [] 0249: for item in agents(): 0250: status = html.escape(str(item.get("status", "UNKNOWN"))) 0251: enabled = bool(item.get("enabled")) 0252: name = html.escape(str(item.get("name", item.get("id")))) 0253: desc = html.escape(str(item.get("description", ""))) 0254: aid = html.escape(str(item.get("id"))) 0255: url = item.get("localUrl") 0256: open_button = f'Open workspace' if url else 'Workspace staged' 0257: cards.append(f'''

{name}

{'ACTIVE' if enabled else 'STAGED'}

{desc}

{status}
{open_button}Status JSON
''') 0258: return f'''SHiRE Agents

SHiRE Specialist Agents

Dedicated scoped brains coordinated by SHiRE Central. Private Tailnet access enabled.

{''.join(cards)}
''' 0260: 0261: ... 0266: print(f"{self.address_string()} - {fmt % args}") 0267: 0268: def _send_json(self, status: int, payload: Any) -> None: 0269: body = json.dumps(payload, ensure_ascii=False, indent=2).encode("utf-8") 0270: self.send_response(status) 0271: self.send_header("Content-Type", "application/json; charset=utf-8") 0272: self.send_header("Content-Length", str(len(body))) ... 0289: return value 0290: 0291: def do_GET(self) -> None: # noqa: N802 0292: path = self.path.split("?", 1)[0] 0293: if path in ("/", "/agents"): 0294: body = dashboard().encode("utf-8") 0295: self.send_response(200) ... 0302: if path == "/health": 0303: return self._send_json(200, service_health()) 0304: if path == "/api/v1/agents": 0305: return self._send_json(200, {"agents": [agent_status(item) for item in agents()]}) 0306: match = re.fullmatch(r"/api/v1/agents/([a-z0-9-]+)(?:/status)?", path) 0307: if match: 0308: item = agent_by_id(match.group(1)) 0309: if not item: 0310: return self._send_json(404, {"error": "Agent not found."}) 0311: return self._send_json(200, agent_status(item)) 0312: return self._send_json(404, {"error": "Not found."}) 0313: 0314: def do_POST(self) -> None: # noqa: N802 0315: path = self.path.split("?", 1)[0] 0316: match = re.fullmatch(r"/api/v1/agents/([a-z0-9-]+)/(chat|tasks)", path) 0317: if not match: 0318: return self._send_json(404, {"error": "Not found."}) ... 0334: def main() -> None: 0335: parser = argparse.ArgumentParser() 0336: parser.add_argument("--check", action="store_true", help="validate registry and exit") 0337: args = parser.parse_args() 0338: if not REGISTRY_FILE.is_file(): 0339: raise SystemExit(f"Missing Agent registry: {REGISTRY_FILE}") 0340: missing = [item.get("id") for item in agents() if not (AGENTS_ROOT / str(item.get("id")) / "SYSTEM_CONTRACT.md").is_file()] 0341: if missing: 0342: raise SystemExit(f"Missing Agent contracts: {', '.join(map(str, missing))}") 0343: DATA_ROOT.mkdir(parents=True, exist_ok=True) 0344: if args.check: 0345: print(json.dumps({"ok": True, "agents": len(agents()), "registry": str(REGISTRY_FILE)}, indent=2)) 0346: return 0347: print(f"SHiRE Agent Hub 0.1.0 listening on http://{HOST}:{PORT}") 0348: ThreadingHTTPServer((HOST, PORT), Handler).serve_forever() 0349: 0350: === SCANFORGE REGISTRATION ADAPTER === 0001: import { agentRegistryEntry } from '@/lib/agentTypes'; 0002: 0003: export const scanForgeAgentRegistration = Object.freeze({ 0004: ...agentRegistryEntry, 0005: manifestUrl: '/agents/scanforge/shire-agent-manifest.json', 0006: statusEndpoint: '/api/v1/agents/scanforge/status', 0007: capabilitiesEndpoint: '/api/v1/agents/scanforge/capabilities', 0008: websocketEndpoint: '/ws/v1/agents/scanforge' 0009: }); 0010: 0011: export function registerScanForgeAgent(registry) { 0012: if (!registry || typeof registry.register !== 'function') { 0013: throw new TypeError('A SHiRE agent registry with register() is required'); 0014: } 0015: registry.register(scanForgeAgentRegistration); 0016: return scanForgeAgentRegistration; 0017: } === SCANFORGE PORTING DOCUMENT RELEVANT LINES === 1:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/.env.shire /mnt/data/shire-scan-forge-shire-agent-ready/.env.shire 3:+++ /mnt/data/shire-scan-forge-shire-agent-ready/.env.shire 2026-07-26 06:19:33.353533228 +0000 7:+VITE_SCANFORGE_ROUTE=/agents/scanforge 8:+VITE_SHIRE_API_BASE_URL= 9:+VITE_SHIRE_MODULE_CONTEXT_URL=/api/v1/modules/scanforge/context 11:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/.env.standalone /mnt/data/shire-scan-forge-shire-agent-ready/.env.standalone 13:+++ /mnt/data/shire-scan-forge-shire-agent-ready/.env.standalone 2026-07-26 06:19:33.353533228 +0000 17:+VITE_SCANFORGE_ROUTE=/agents/scanforge 18:+VITE_SCAN_BRIDGE_BASE_URL=https://shire-mini.local:8745 19:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/README.md /mnt/data/shire-scan-forge-shire-agent-ready/README.md 21:+++ /mnt/data/shire-scan-forge-shire-agent-ready/README.md 2026-07-26 06:21:10.685535450 +0000 23:-# Base44 Project 26:-Use this repository to run and edit the app locally, then publish changes back through Base44. 29:-Any change pushed to the repo will also be reflected in the Base44 Builder. 30:+- Native SHiRE Agent module at `/agents/scanforge` 31:+- Standalone Base44 application 36:-1. Clone the repository using the project's Git URL. 39:-4. Install the Base44 CLI: `npm install -g base44@latest`. 40:+- `docs/ORIGINAL_EXPORT_AUDIT.md` 42:+- `public/shire-agent-manifest.json` 45:-See the [Base44 CLI docs](https://docs.base44.com/developers/references/cli/get-started/overview) if you want to run Base44 commands directly. 52:-base44 dev 55:-`base44 dev` starts the local Base44 development backend and, when this app is configured for it, also starts the frontend dev server for you. Use the frontend URL printed by the command. 57:-For example, when the Base44 project config includes a `serveCommand`, `base44 dev` can launch the frontend too: 67:-In a Base44 project this lives in `base44/config.jsonc`. 71:-If you only want to work on the frontend against the hosted Base44 backend, run: 79:-Open the local URL printed by Vite. 86:-VITE_BASE44_APP_ID=your_app_id 87:-VITE_BASE44_APP_BASE_URL=https://your-app.base44.app 90:-`VITE_BASE44_APP_ID` identifies the Base44 app. 92:-`VITE_BASE44_APP_BASE_URL` tells the Base44 Vite plugin where to send local `/api` requests. Point it at your deployed Base44 app URL when you want the local frontend to use the hosted backend. 94:-When you use `base44 dev`, the command injects the local Base44 values for you, so `.env.local` is mainly needed for frontend-only workflows. 98:-After pushing your changes to git, open the Base44 dashboard and publish the app: 102:-base44 dashboard open 107:-## Docs & Support 109:-Documentation: [https://docs.base44.com/Integrations/Using-GitHub](https://docs.base44.com/Integrations/Using-GitHub) 111:-Base44 CLI command reference: [https://docs.base44.com/developers/references/cli/commands/introduction](https://docs.base44.com/developers/references/cli/commands/introduction) 113:-Support: [https://app.base44.com/support](https://app.base44.com/support) 114:+The frontend is not the Kinect driver. Real scanning requires the separate SHiRE ScanForge Agent and local SHiRE Scan Bridge on SHiRE Mini. 115:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/base44/config.jsonc /mnt/data/shire-scan-forge-shire-agent-ready/base44/config.jsonc 116:--- /mnt/data/shire-scan-forge-audit/base44/config.jsonc 2026-07-26 06:06:34.000000000 +0000 117:+++ /mnt/data/shire-scan-forge-shire-agent-ready/base44/config.jsonc 2026-07-26 06:23:38.793538833 +0000 131:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-action.schema.json /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-action.schema.json 132:--- /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-action.schema.json 1970-01-01 00:00:00.000000000 +0000 133:+++ /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-action.schema.json 2026-07-26 06:21:10.685535450 +0000 137:+ "$id": "https://shire.local/contracts/scanforge-agent-action.schema.json", 138:+ "title": "ScanForge Agent Action", 148:+ "prepare_export", "send_to_forge", "save_to_shirevault" 156:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-status.schema.json /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-status.schema.json 157:--- /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-status.schema.json 1970-01-01 00:00:00.000000000 +0000 158:+++ /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-status.schema.json 2026-07-26 06:21:10.685535450 +0000 162:+ "$id": "https://shire.local/contracts/scanforge-agent-status.schema.json", 163:+ "title": "ScanForge Agent Status", 166:+ "required": ["agentState", "bridgeState", "kinectState", "operation"], 168:+ "agentState": {"enum": ["offline", "starting", "online", "warning", "failed"]}, 171:+ "operation": {"enum": ["idle", "calibrating", "capturing", "paused", "processing", "exporting"]}, 180:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/ORIGINAL_EXPORT_AUDIT.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/ORIGINAL_EXPORT_AUDIT.md 181:--- /mnt/data/shire-scan-forge-audit/docs/ORIGINAL_EXPORT_AUDIT.md 1970-01-01 00:00:00.000000000 +0000 182:+++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/ORIGINAL_EXPORT_AUDIT.md 2026-07-26 06:21:10.685535450 +0000 184:+# Original Base44 Export Audit 188:+## What the export already contained 192:+- SHiRE module route concept at `/agents/scanforge`. 193:+- `ScanForgeAgentWorkspace`, compact module header and reusable Agents card. 194:+- Logical SHiRE agent client and local Scan Bridge client. 195:+- Base44 entities for scan projects, capture sessions, mesh versions, calibration, measurements, exports and audit events. 202:+2. The Base44 authentication provider was mounted even in `SHIRE_MODULE` mode, causing unwanted Base44 requests. 203:+3. Project creation, project listing and the Agents card still depended directly on Base44 entities in module mode. 204:+4. The live capture controls mostly changed browser state rather than calling the ScanForge Agent or Scan Bridge. 206:+6. The configured ScanForge route was not consistently used. 207:+7. The export did not include separate SHiRE-module and standalone build commands. 208:+8. It included interface shells for processing, Mesh Lab, measurements, calibration, print checks and exports, but no actual Kinect driver, mesh reconstruction service or SHiRE backend implementation. 212:+- Normalised API and WebSocket URL joining. 213:+- Prevented Base44 authentication startup in SHiRE module mode. 214:+- Added a project repository abstraction that uses the SHiRE Agent in module mode and Base44 only in standalone mode. 215:+- Added parent-injected SHiRE module context support and same-origin session fallback. 216:+- Added live ScanForge Agent status polling. 217:+- Routed real capture controls through structured agent actions. 219:+- Added an agent manifest and JSON contracts. 230:+- SHiRE global Agents registry changes inside `/home/shire3d/ARMOR`. 232:+- Real print analysis, calibration or export execution. 235:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/SHIRE_INTEGRATION_HANDOVER.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/SHIRE_INTEGRATION_HANDOVER.md 237:+++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/SHIRE_INTEGRATION_HANDOVER.md 2026-07-26 06:21:10.685535450 +0000 239:+# SHiRE ScanForge Agent Integration Handover 243:+`SHiRE → Agents → ScanForge Scanner Agent` 245:+Primary route: 247:+`/agents/scanforge` 284:+ "apiBaseUrl": "", 285:+ "agentId": "scanforge", 295:+- `GET /api/v1/agents/scanforge` 296:+- `GET /api/v1/agents/scanforge/status` 297:+- `GET /api/v1/agents/scanforge/capabilities` 298:+- `POST /api/v1/agents/scanforge/start` 299:+- `POST /api/v1/agents/scanforge/stop` 300:+- `POST /api/v1/agents/scanforge/restart` 301:+- `GET /api/v1/agents/scanforge/projects` 302:+- `GET /api/v1/agents/scanforge/jobs` 303:+- `POST /api/v1/agents/scanforge/actions` 304:+- `WS /ws/v1/agents/scanforge` 308:+## Main Agents registry 310:+Register `public/shire-agent-manifest.json` in SHiRE's global Agents registry. The main Agents tab should load status from the backend, then pass it to `AgentCard` or render the same fields natively. 327:+- File exports and SHA-256 generation. 334:+- No public inbound ports. 340:+- Demo mode must never be reported as real hardware. 348:+This is a network-mounted destination. Before any backup-dependent action, verify the mount is present, has the expected identity, is writable, supports read-back and has a verified checksum. Stop on failure. Do not silently use a local fallback. 352:+`Send to SHiRE Forge` creates imported source geometry only. It does not certify scale, approve manufacturing, remove warnings, select a printer without confirmation, unlock Forge automatically or generate socket/implant/load-bearing prosthetic geometry. 357:+2. Create and checksum a backup of the current ARMOR UI and Agents registry under `/SHiREVault/Backup/OSBackups`. 361:+6. Serve the module under `/agents/scanforge` in staging. 362:+7. Add the manifest to the Agents registry without enabling hardware control. 363:+8. Confirm the module shows `SHIRE AGENT CONNECTION UNAVAILABLE` rather than fake data. 364:+9. Implement the ScanForge Agent backend. 369:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/SOURCE_VALIDATION.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/SOURCE_VALIDATION.md 371:+++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/SOURCE_VALIDATION.md 2026-07-26 06:24:37.037540163 +0000 379:+- All local import targets exist. 397:+Do not enable hardware control until the ScanForge Agent and local Scan Bridge endpoints pass their own tests. 398:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/base44-to-shire-agent.patch /mnt/data/shire-scan-forge-shire-agent-ready/docs/base44-to-shire-agent.patch 399:--- /mnt/data/shire-scan-forge-audit/docs/base44-to-shire-agent.patch 1970-01-01 00:00:00.000000000 +0000 400:+++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/base44-to-shire-agent.patch 2026-07-26 06:24:37.037540163 +0000 402:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/.env.shire /mnt/data/shire-scan-forge-shire-agent-ready/.env.shire 404:++++ /mnt/data/shire-scan-forge-shire-agent-ready/.env.shire 2026-07-26 06:19:33.353533228 +0000 408:++VITE_SCANFORGE_ROUTE=/agents/scanforge 409:++VITE_SHIRE_API_BASE_URL= 410:++VITE_SHIRE_MODULE_CONTEXT_URL=/api/v1/modules/scanforge/context 412:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/.env.standalone /mnt/data/shire-scan-forge-shire-agent-ready/.env.standalone 414:++++ /mnt/data/shire-scan-forge-shire-agent-ready/.env.standalone 2026-07-26 06:19:33.353533228 +0000 418:++VITE_SCANFORGE_ROUTE=/agents/scanforge 419:++VITE_SCAN_BRIDGE_BASE_URL=https://shire-mini.local:8745 420:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/README.md /mnt/data/shire-scan-forge-shire-agent-ready/README.md 422:++++ /mnt/data/shire-scan-forge-shire-agent-ready/README.md 2026-07-26 06:21:10.685535450 +0000 424:+-# Base44 Project 427:+-Use this repository to run and edit the app locally, then publish changes back through Base44. 430:+-Any change pushed to the repo will also be reflected in the Base44 Builder. 431:++- Native SHiRE Agent module at `/agents/scanforge` 432:++- Standalone Base44 application 437:+-1. Clone the repository using the project's Git URL. 440:+-4. Install the Base44 CLI: `npm install -g base44@latest`. 441:++- `docs/ORIGINAL_EXPORT_AUDIT.md` 443:++- `public/shire-agent-manifest.json` 446:+-See the [Base44 CLI docs](https://docs.base44.com/developers/references/cli/get-started/overview) if you want to run Base44 commands directly. 453:+-base44 dev 456:+-`base44 dev` starts the local Base44 development backend and, when this app is configured for it, also starts the frontend dev server for you. Use the frontend URL printed by the command. 458:+-For example, when the Base44 project config includes a `serveCommand`, `base44 dev` can launch the frontend too: 468:+-In a Base44 project this lives in `base44/config.jsonc`. 472:+-If you only want to work on the frontend against the hosted Base44 backend, run: 480:+-Open the local URL printed by Vite. 487:+-VITE_BASE44_APP_ID=your_app_id 488:+-VITE_BASE44_APP_BASE_URL=https://your-app.base44.app 491:+-`VITE_BASE44_APP_ID` identifies the Base44 app. 493:+-`VITE_BASE44_APP_BASE_URL` tells the Base44 Vite plugin where to send local `/api` requests. Point it at your deployed Base44 app URL when you want the local frontend to use the hosted backend. 495:+-When you use `base44 dev`, the command injects the local Base44 values for you, so `.env.local` is mainly needed for frontend-only workflows. 499:+-After pushing your changes to git, open the Base44 dashboard and publish the app: 503:+-base44 dashboard open 508:+-## Docs & Support 510:+-Documentation: [https://docs.base44.com/Integrations/Using-GitHub](https://docs.base44.com/Integrations/Using-GitHub) 512:+-Base44 CLI command reference: [https://docs.base44.com/developers/references/cli/commands/introduction](https://docs.base44.com/developers/references/cli/commands/introduction) 514:+-Support: [https://app.base44.com/support](https://app.base44.com/support) 515:++The frontend is not the Kinect driver. Real scanning requires the separate SHiRE ScanForge Agent and local SHiRE Scan Bridge on SHiRE Mini. 516:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/base44/config.jsonc /mnt/data/shire-scan-forge-shire-agent-ready/base44/config.jsonc 517:+--- /mnt/data/shire-scan-forge-audit/base44/config.jsonc 2026-07-26 06:06:34.000000000 +0000 518:++++ /mnt/data/shire-scan-forge-shire-agent-ready/base44/config.jsonc 2026-07-26 06:23:38.793538833 +0000 532:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-action.schema.json /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-action.schema.json 533:+--- /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-action.schema.json 1970-01-01 00:00:00.000000000 +0000 534:++++ /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-action.schema.json 2026-07-26 06:21:10.685535450 +0000 538:++ "$id": "https://shire.local/contracts/scanforge-agent-action.schema.json", 539:++ "title": "ScanForge Agent Action", 549:++ "prepare_export", "send_to_forge", "save_to_shirevault" 557:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-status.schema.json /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-status.schema.json 558:+--- /mnt/data/shire-scan-forge-audit/contracts/scanforge-agent-status.schema.json 1970-01-01 00:00:00.000000000 +0000 559:++++ /mnt/data/shire-scan-forge-shire-agent-ready/contracts/scanforge-agent-status.schema.json 2026-07-26 06:21:10.685535450 +0000 563:++ "$id": "https://shire.local/contracts/scanforge-agent-status.schema.json", 564:++ "title": "ScanForge Agent Status", 567:++ "required": ["agentState", "bridgeState", "kinectState", "operation"], 569:++ "agentState": {"enum": ["offline", "starting", "online", "warning", "failed"]}, 572:++ "operation": {"enum": ["idle", "calibrating", "capturing", "paused", "processing", "exporting"]}, 581:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/ORIGINAL_EXPORT_AUDIT.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/ORIGINAL_EXPORT_AUDIT.md 582:+--- /mnt/data/shire-scan-forge-audit/docs/ORIGINAL_EXPORT_AUDIT.md 1970-01-01 00:00:00.000000000 +0000 583:++++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/ORIGINAL_EXPORT_AUDIT.md 2026-07-26 06:21:10.685535450 +0000 585:++# Original Base44 Export Audit 589:++## What the export already contained 593:++- SHiRE module route concept at `/agents/scanforge`. 594:++- `ScanForgeAgentWorkspace`, compact module header and reusable Agents card. 595:++- Logical SHiRE agent client and local Scan Bridge client. 596:++- Base44 entities for scan projects, capture sessions, mesh versions, calibration, measurements, exports and audit events. 603:++2. The Base44 authentication provider was mounted even in `SHIRE_MODULE` mode, causing unwanted Base44 requests. 604:++3. Project creation, project listing and the Agents card still depended directly on Base44 entities in module mode. 605:++4. The live capture controls mostly changed browser state rather than calling the ScanForge Agent or Scan Bridge. 607:++6. The configured ScanForge route was not consistently used. 608:++7. The export did not include separate SHiRE-module and standalone build commands. 609:++8. It included interface shells for processing, Mesh Lab, measurements, calibration, print checks and exports, but no actual Kinect driver, mesh reconstruction service or SHiRE backend implementation. 613:++- Normalised API and WebSocket URL joining. 614:++- Prevented Base44 authentication startup in SHiRE module mode. 615:++- Added a project repository abstraction that uses the SHiRE Agent in module mode and Base44 only in standalone mode. 616:++- Added parent-injected SHiRE module context support and same-origin session fallback. 617:++- Added live ScanForge Agent status polling. 618:++- Routed real capture controls through structured agent actions. 620:++- Added an agent manifest and JSON contracts. 631:++- SHiRE global Agents registry changes inside `/home/shire3d/ARMOR`. 633:++- Real print analysis, calibration or export execution. 636:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/SHIRE_INTEGRATION_HANDOVER.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/SHIRE_INTEGRATION_HANDOVER.md 638:++++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/SHIRE_INTEGRATION_HANDOVER.md 2026-07-26 06:21:10.685535450 +0000 640:++# SHiRE ScanForge Agent Integration Handover 644:++`SHiRE → Agents → ScanForge Scanner Agent` 646:++Primary route: 648:++`/agents/scanforge` 685:++ "apiBaseUrl": "", 686:++ "agentId": "scanforge", 696:++- `GET /api/v1/agents/scanforge` 697:++- `GET /api/v1/agents/scanforge/status` 698:++- `GET /api/v1/agents/scanforge/capabilities` 699:++- `POST /api/v1/agents/scanforge/start` 700:++- `POST /api/v1/agents/scanforge/stop` 701:++- `POST /api/v1/agents/scanforge/restart` 702:++- `GET /api/v1/agents/scanforge/projects` 703:++- `GET /api/v1/agents/scanforge/jobs` 704:++- `POST /api/v1/agents/scanforge/actions` 705:++- `WS /ws/v1/agents/scanforge` 709:++## Main Agents registry 711:++Register `public/shire-agent-manifest.json` in SHiRE's global Agents registry. The main Agents tab should load status from the backend, then pass it to `AgentCard` or render the same fields natively. 728:++- File exports and SHA-256 generation. 735:++- No public inbound ports. 741:++- Demo mode must never be reported as real hardware. 749:++This is a network-mounted destination. Before any backup-dependent action, verify the mount is present, has the expected identity, is writable, supports read-back and has a verified checksum. Stop on failure. Do not silently use a local fallback. 753:++`Send to SHiRE Forge` creates imported source geometry only. It does not certify scale, approve manufacturing, remove warnings, select a printer without confirmation, unlock Forge automatically or generate socket/implant/load-bearing prosthetic geometry. 758:++2. Create and checksum a backup of the current ARMOR UI and Agents registry under `/SHiREVault/Backup/OSBackups`. 762:++6. Serve the module under `/agents/scanforge` in staging. 763:++7. Add the manifest to the Agents registry without enabling hardware control. 764:++8. Confirm the module shows `SHIRE AGENT CONNECTION UNAVAILABLE` rather than fake data. 765:++9. Implement the ScanForge Agent backend. 770:+diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/docs/SOURCE_VALIDATION.md /mnt/data/shire-scan-forge-shire-agent-ready/docs/SOURCE_VALIDATION.md 772:++++ /mnt/data/shire-scan-forge-shire-agent-ready/docs/SOURCE_VALIDATION.md 2026-07-26 06:24:37.037540163 +0000 780:++- All local import targets exist. 798:++Do not enable hardware control until the ScanForge Agent and local Scan Bridge endpoints pass their own tests. 799:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/index.html /mnt/data/shire-scan-forge-shire-agent-ready/index.html 801:+++ /mnt/data/shire-scan-forge-shire-agent-ready/index.html 2026-07-26 06:24:06.569539467 +0000 806:- 807: 808:- 809:- Base44 APP 812:+ 813:+ 818:diff -ruN '--exclude=node_modules' '--exclude=dist' /mnt/data/shire-scan-forge-audit/package-lock.json /mnt/data/shire-scan-forge-shire-agent-ready/package-lock.json === EVIDENCE === d1d10f53cb4961edd39456492ef792c90e9742f198d0d93e53a69febb3a68943 /SHiREVault/Backup/OSBackups/TRENDSCOUT-NATIVE-0002B-SCHEMA-20260730T015135Z/trendscout-schema-audit.txt PASS: TrendScout Stage 2B schema audit completed. No ARMOR files, services, timers, ports or settings were changed. Evidence: /SHiREVault/Backup/OSBackups/TRENDSCOUT-NATIVE-0002B-SCHEMA-20260730T015135Z