Files
anthonyrawlins 85bf1341f3 Add comprehensive frontend UI and distributed infrastructure
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>
2025-07-10 08:41:59 +10:00

126 lines
2.5 KiB
JavaScript

let OldValue = require('./old-value')
let Prefixer = require('./prefixer')
let utils = require('./utils')
let vendor = require('./vendor')
class Value extends Prefixer {
/**
* Clone decl for each prefixed values
*/
static save(prefixes, decl) {
let prop = decl.prop
let result = []
for (let prefix in decl._autoprefixerValues) {
let value = decl._autoprefixerValues[prefix]
if (value === decl.value) {
continue
}
let item
let propPrefix = vendor.prefix(prop)
if (propPrefix === '-pie-') {
continue
}
if (propPrefix === prefix) {
item = decl.value = value
result.push(item)
continue
}
let prefixed = prefixes.prefixed(prop, prefix)
let rule = decl.parent
if (!rule.every(i => i.prop !== prefixed)) {
result.push(item)
continue
}
let trimmed = value.replace(/\s+/, ' ')
let already = rule.some(
i => i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed
)
if (already) {
result.push(item)
continue
}
let cloned = this.clone(decl, { value })
item = decl.parent.insertBefore(decl, cloned)
result.push(item)
}
return result
}
/**
* Save values with next prefixed token
*/
add(decl, prefix) {
if (!decl._autoprefixerValues) {
decl._autoprefixerValues = {}
}
let value = decl._autoprefixerValues[prefix] || this.value(decl)
let before
do {
before = value
value = this.replace(value, prefix)
if (value === false) return
} while (value !== before)
decl._autoprefixerValues[prefix] = value
}
/**
* Is declaration need to be prefixed
*/
check(decl) {
let value = decl.value
if (!value.includes(this.name)) {
return false
}
return !!value.match(this.regexp())
}
/**
* Return function to fast find prefixed value
*/
old(prefix) {
return new OldValue(this.name, prefix + this.name)
}
/**
* Lazy regexp loading
*/
regexp() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name))
}
/**
* Add prefix to values in string
*/
replace(string, prefix) {
return string.replace(this.regexp(), `$1${prefix}$2`)
}
/**
* Get value with comments if it was not changed
*/
value(decl) {
if (decl.raws.value && decl.raws.value.value === decl.value) {
return decl.raws.value.raw
} else {
return decl.value
}
}
}
module.exports = Value