 85bf1341f3
			
		
	
	85bf1341f3
	
	
	
		
			
			Frontend Enhancements: - Complete React TypeScript frontend with modern UI components - Distributed workflows management interface with real-time updates - Socket.IO integration for live agent status monitoring - Agent management dashboard with cluster visualization - Project management interface with metrics and task tracking - Responsive design with proper error handling and loading states Backend Infrastructure: - Distributed coordinator for multi-agent workflow orchestration - Cluster management API with comprehensive agent operations - Enhanced database models for agents and projects - Project service for filesystem-based project discovery - Performance monitoring and metrics collection - Comprehensive API documentation and error handling Documentation: - Complete distributed development guide (README_DISTRIBUTED.md) - Comprehensive development report with architecture insights - System configuration templates and deployment guides The platform now provides a complete web interface for managing the distributed AI cluster with real-time monitoring, workflow orchestration, and agent coordination capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			117 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			117 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import * as util from "../core/util.js";
 | |
| const error = () => {
 | |
|     const Sizable = {
 | |
|         string: { unit: "tegn", verb: "å ha" },
 | |
|         file: { unit: "bytes", verb: "å ha" },
 | |
|         array: { unit: "elementer", verb: "å inneholde" },
 | |
|         set: { unit: "elementer", verb: "å inneholde" },
 | |
|     };
 | |
|     function getSizing(origin) {
 | |
|         return Sizable[origin] ?? null;
 | |
|     }
 | |
|     const parsedType = (data) => {
 | |
|         const t = typeof data;
 | |
|         switch (t) {
 | |
|             case "number": {
 | |
|                 return Number.isNaN(data) ? "NaN" : "tall";
 | |
|             }
 | |
|             case "object": {
 | |
|                 if (Array.isArray(data)) {
 | |
|                     return "liste";
 | |
|                 }
 | |
|                 if (data === null) {
 | |
|                     return "null";
 | |
|                 }
 | |
|                 if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
 | |
|                     return data.constructor.name;
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         return t;
 | |
|     };
 | |
|     const Nouns = {
 | |
|         regex: "input",
 | |
|         email: "e-postadresse",
 | |
|         url: "URL",
 | |
|         emoji: "emoji",
 | |
|         uuid: "UUID",
 | |
|         uuidv4: "UUIDv4",
 | |
|         uuidv6: "UUIDv6",
 | |
|         nanoid: "nanoid",
 | |
|         guid: "GUID",
 | |
|         cuid: "cuid",
 | |
|         cuid2: "cuid2",
 | |
|         ulid: "ULID",
 | |
|         xid: "XID",
 | |
|         ksuid: "KSUID",
 | |
|         datetime: "ISO dato- og klokkeslett",
 | |
|         date: "ISO-dato",
 | |
|         time: "ISO-klokkeslett",
 | |
|         duration: "ISO-varighet",
 | |
|         ipv4: "IPv4-område",
 | |
|         ipv6: "IPv6-område",
 | |
|         cidrv4: "IPv4-spekter",
 | |
|         cidrv6: "IPv6-spekter",
 | |
|         base64: "base64-enkodet streng",
 | |
|         base64url: "base64url-enkodet streng",
 | |
|         json_string: "JSON-streng",
 | |
|         e164: "E.164-nummer",
 | |
|         jwt: "JWT",
 | |
|         template_literal: "input",
 | |
|     };
 | |
|     return (issue) => {
 | |
|         switch (issue.code) {
 | |
|             case "invalid_type":
 | |
|                 return `Ugyldig input: forventet ${issue.expected}, fikk ${parsedType(issue.input)}`;
 | |
|             case "invalid_value":
 | |
|                 if (issue.values.length === 1)
 | |
|                     return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;
 | |
|                 return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, "|")}`;
 | |
|             case "too_big": {
 | |
|                 const adj = issue.inclusive ? "<=" : "<";
 | |
|                 const sizing = getSizing(issue.origin);
 | |
|                 if (sizing)
 | |
|                     return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementer"}`;
 | |
|                 return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()}`;
 | |
|             }
 | |
|             case "too_small": {
 | |
|                 const adj = issue.inclusive ? ">=" : ">";
 | |
|                 const sizing = getSizing(issue.origin);
 | |
|                 if (sizing) {
 | |
|                     return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;
 | |
|                 }
 | |
|                 return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()}`;
 | |
|             }
 | |
|             case "invalid_format": {
 | |
|                 const _issue = issue;
 | |
|                 if (_issue.format === "starts_with")
 | |
|                     return `Ugyldig streng: må starte med "${_issue.prefix}"`;
 | |
|                 if (_issue.format === "ends_with")
 | |
|                     return `Ugyldig streng: må ende med "${_issue.suffix}"`;
 | |
|                 if (_issue.format === "includes")
 | |
|                     return `Ugyldig streng: må inneholde "${_issue.includes}"`;
 | |
|                 if (_issue.format === "regex")
 | |
|                     return `Ugyldig streng: må matche mønsteret ${_issue.pattern}`;
 | |
|                 return `Ugyldig ${Nouns[_issue.format] ?? issue.format}`;
 | |
|             }
 | |
|             case "not_multiple_of":
 | |
|                 return `Ugyldig tall: må være et multiplum av ${issue.divisor}`;
 | |
|             case "unrecognized_keys":
 | |
|                 return `${issue.keys.length > 1 ? "Ukjente nøkler" : "Ukjent nøkkel"}: ${util.joinValues(issue.keys, ", ")}`;
 | |
|             case "invalid_key":
 | |
|                 return `Ugyldig nøkkel i ${issue.origin}`;
 | |
|             case "invalid_union":
 | |
|                 return "Ugyldig input";
 | |
|             case "invalid_element":
 | |
|                 return `Ugyldig verdi i ${issue.origin}`;
 | |
|             default:
 | |
|                 return `Ugyldig input`;
 | |
|         }
 | |
|     };
 | |
| };
 | |
| export default function () {
 | |
|     return {
 | |
|         localeError: error(),
 | |
|     };
 | |
| }
 |