ai-control-center 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +584 -0
- package/bin/aicc.js +772 -0
- package/lib/actions/approve.js +71 -0
- package/lib/actions/assign-project.js +132 -0
- package/lib/actions/browser-test.js +64 -0
- package/lib/actions/cleanup.js +174 -0
- package/lib/actions/debug.js +298 -0
- package/lib/actions/deploy.js +1229 -0
- package/lib/actions/fix-bug.js +134 -0
- package/lib/actions/new-feature.js +255 -0
- package/lib/actions/reject.js +307 -0
- package/lib/actions/review.js +706 -0
- package/lib/actions/status.js +47 -0
- package/lib/agents/browser-qa-agent.js +611 -0
- package/lib/agents/payment-agent.js +116 -0
- package/lib/agents/suggestion-agent.js +88 -0
- package/lib/cli.js +303 -0
- package/lib/config.js +243 -0
- package/lib/hub/hub-server.js +440 -0
- package/lib/hub/project-poller.js +75 -0
- package/lib/hub/skill-registry.js +89 -0
- package/lib/hub/state-aggregator.js +204 -0
- package/lib/index.js +471 -0
- package/lib/init/doctor.js +523 -0
- package/lib/init/presets.js +222 -0
- package/lib/init/skill-fetcher.js +77 -0
- package/lib/init/wizard.js +973 -0
- package/lib/integrations/codex-runner.js +128 -0
- package/lib/integrations/github-actions.js +248 -0
- package/lib/integrations/github-reporter.js +229 -0
- package/lib/integrations/screenshot-store.js +102 -0
- package/lib/openclaw/bridge.js +650 -0
- package/lib/openclaw/generate-skill.js +235 -0
- package/lib/openclaw/openclaw.json +64 -0
- package/lib/orchestrator/autonomous-loop.js +429 -0
- package/lib/orchestrator/thread-triggers.js +63 -0
- package/lib/roleplay/agent-messenger.js +75 -0
- package/lib/roleplay/discussion-threads.js +303 -0
- package/lib/roleplay/health-monitor.js +121 -0
- package/lib/roleplay/pm-agent.js +513 -0
- package/lib/roleplay/roleplay-config.js +25 -0
- package/lib/roleplay/room.js +164 -0
- package/lib/shared/action-runner.js +2330 -0
- package/lib/shared/event-bus.js +185 -0
- package/lib/slack/bot.js +378 -0
- package/lib/telegram/bot.js +416 -0
- package/lib/telegram/commands.js +1267 -0
- package/lib/telegram/keyboards.js +113 -0
- package/lib/telegram/notifications.js +247 -0
- package/lib/twitch/bot.js +354 -0
- package/lib/twitch/commands.js +302 -0
- package/lib/twitch/notifications.js +63 -0
- package/lib/utils/achievements.js +191 -0
- package/lib/utils/activity-log.js +182 -0
- package/lib/utils/agent-leaderboard.js +119 -0
- package/lib/utils/audit-logger.js +232 -0
- package/lib/utils/codebase-context.js +288 -0
- package/lib/utils/codebase-indexer.js +381 -0
- package/lib/utils/config-schema.js +230 -0
- package/lib/utils/context-compressor.js +172 -0
- package/lib/utils/correlation.js +63 -0
- package/lib/utils/cost-tracker.js +423 -0
- package/lib/utils/cron-scheduler.js +53 -0
- package/lib/utils/db-adapter.js +293 -0
- package/lib/utils/display.js +272 -0
- package/lib/utils/errors.js +116 -0
- package/lib/utils/format.js +134 -0
- package/lib/utils/intent-engine.js +464 -0
- package/lib/utils/mcp-client.js +238 -0
- package/lib/utils/model-ab-test.js +164 -0
- package/lib/utils/notify.js +122 -0
- package/lib/utils/persona-loader.js +80 -0
- package/lib/utils/pipeline-lock.js +73 -0
- package/lib/utils/pipeline.js +214 -0
- package/lib/utils/plugin-runner.js +234 -0
- package/lib/utils/rate-limiter.js +84 -0
- package/lib/utils/rbac.js +74 -0
- package/lib/utils/runner.js +1809 -0
- package/lib/utils/security.js +191 -0
- package/lib/utils/self-healer.js +144 -0
- package/lib/utils/skill-loader.js +255 -0
- package/lib/utils/spinner.js +132 -0
- package/lib/utils/stage-queue.js +50 -0
- package/lib/utils/state-machine.js +89 -0
- package/lib/utils/status-bar.js +327 -0
- package/lib/utils/token-estimator.js +101 -0
- package/lib/utils/ux-analyzer.js +101 -0
- package/lib/utils/webhook-emitter.js +83 -0
- package/lib/web/public/css/styles.css +417 -0
- package/lib/web/public/dark-mode.js +44 -0
- package/lib/web/public/hub/kanban.html +206 -0
- package/lib/web/public/index.html +45 -0
- package/lib/web/public/js/app.js +71 -0
- package/lib/web/public/js/ask.js +110 -0
- package/lib/web/public/js/dashboard.js +165 -0
- package/lib/web/public/js/deploy.js +72 -0
- package/lib/web/public/js/feature.js +79 -0
- package/lib/web/public/js/health.js +65 -0
- package/lib/web/public/js/logs.js +93 -0
- package/lib/web/public/js/review.js +123 -0
- package/lib/web/public/js/ws-client.js +82 -0
- package/lib/web/public/office/css/office.css +678 -0
- package/lib/web/public/office/index.html +148 -0
- package/lib/web/public/office/js/achievements-ui.js +117 -0
- package/lib/web/public/office/js/character.js +1056 -0
- package/lib/web/public/office/js/chat-bubbles.js +177 -0
- package/lib/web/public/office/js/cost-overlay.js +123 -0
- package/lib/web/public/office/js/day-night.js +68 -0
- package/lib/web/public/office/js/effects.js +632 -0
- package/lib/web/public/office/js/engine.js +146 -0
- package/lib/web/public/office/js/feature-ticket.js +216 -0
- package/lib/web/public/office/js/hub-client.js +60 -0
- package/lib/web/public/office/js/main.js +1757 -0
- package/lib/web/public/office/js/office-layout.js +1524 -0
- package/lib/web/public/office/js/pathfinding.js +144 -0
- package/lib/web/public/office/js/pixel-sprites.js +1454 -0
- package/lib/web/public/office/js/progress-bars.js +117 -0
- package/lib/web/public/office/js/replay.js +191 -0
- package/lib/web/public/office/js/sound-effects.js +91 -0
- package/lib/web/public/office/js/sprite-renderer.js +211 -0
- package/lib/web/public/office/js/stamina-system.js +89 -0
- package/lib/web/public/office/js/ui.js +107 -0
- package/lib/web/public/onboarding/index.html +243 -0
- package/lib/web/public/timeline/index.html +195 -0
- package/lib/web/routes/api.js +499 -0
- package/lib/web/routes/logs.js +20 -0
- package/lib/web/routes/metrics.js +99 -0
- package/lib/web/server.js +183 -0
- package/lib/web/ws/handler.js +65 -0
- package/package.json +67 -0
- package/templates/agent-architect.md +69 -0
- package/templates/agent-gemini-pm.md +49 -0
- package/templates/agent-gemini-reviewer.md +52 -0
- package/templates/copilot-instructions.md +36 -0
- package/templates/pipelines/mobile.json +27 -0
- package/templates/pipelines/nodejs-api.json +27 -0
- package/templates/pipelines/python.json +27 -0
- package/templates/pipelines/react.json +27 -0
- package/templates/pipelines/salesforce.json +27 -0
- package/templates/role-gemini.md +97 -0
- package/templates/skill-architect.md +114 -0
- package/templates/skill-browser-qa.md +50 -0
- package/templates/skill-bug-from-qa.md +58 -0
- package/templates/skill-chatbot.md +93 -0
- package/templates/skill-implement.md +78 -0
- package/templates/skill-openclaw.md +174 -0
- package/templates/skill-payment.md +110 -0
- package/templates/skill-pm-spec.md +77 -0
- package/templates/skill-requirement-capture.md +97 -0
- package/templates/skill-review.md +108 -0
- package/templates/skill-reviewer-qa.md +44 -0
- package/templates/skill-suggestion.md +45 -0
- package/templates/skill-template.md +142 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A* Pathfinding on tile grid
|
|
3
|
+
* Characters walk naturally around furniture
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const TILE = 32;
|
|
7
|
+
|
|
8
|
+
class PriorityQueue {
|
|
9
|
+
constructor() { this.items = []; }
|
|
10
|
+
push(item, priority) {
|
|
11
|
+
this.items.push({ item, priority });
|
|
12
|
+
this.items.sort((a, b) => a.priority - b.priority);
|
|
13
|
+
}
|
|
14
|
+
pop() { return this.items.shift()?.item; }
|
|
15
|
+
get length() { return this.items.length; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A* pathfinder for office grid
|
|
20
|
+
*/
|
|
21
|
+
export class Pathfinder {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.grids = new Map(); // projectName -> 2D walkability grid
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Build walkability grid for a team zone
|
|
28
|
+
* @param {string} projectName
|
|
29
|
+
* @param {object} origin - {x, y} world position of team zone
|
|
30
|
+
* @param {number} width - tiles
|
|
31
|
+
* @param {number} height - tiles
|
|
32
|
+
* @param {Array} obstacles - [{x, y, w, h}] in tile coords
|
|
33
|
+
*/
|
|
34
|
+
buildGrid(projectName, origin, width, height, obstacles = []) {
|
|
35
|
+
const grid = [];
|
|
36
|
+
for (let y = 0; y < height; y++) {
|
|
37
|
+
grid[y] = [];
|
|
38
|
+
for (let x = 0; x < width; x++) {
|
|
39
|
+
grid[y][x] = 1; // walkable
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Mark obstacles
|
|
43
|
+
for (const obs of obstacles) {
|
|
44
|
+
for (let dy = 0; dy < obs.h; dy++) {
|
|
45
|
+
for (let dx = 0; dx < obs.w; dx++) {
|
|
46
|
+
const gy = obs.y + dy;
|
|
47
|
+
const gx = obs.x + dx;
|
|
48
|
+
if (gy >= 0 && gy < height && gx >= 0 && gx < width) {
|
|
49
|
+
grid[gy][gx] = 0; // blocked
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Ensure edges of furniture are walkable (adjacent tiles)
|
|
55
|
+
this.grids.set(projectName, { grid, origin, width, height });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Find path between two world positions
|
|
60
|
+
* @returns {Array<{x, y}>} path in world coordinates, or empty if no path
|
|
61
|
+
*/
|
|
62
|
+
findPath(projectName, startX, startY, endX, endY) {
|
|
63
|
+
const gridData = this.grids.get(projectName);
|
|
64
|
+
if (!gridData) {
|
|
65
|
+
// No grid — just return direct path
|
|
66
|
+
return [{ x: endX, y: endY }];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const { grid, origin, width, height } = gridData;
|
|
70
|
+
|
|
71
|
+
// Convert world to grid coords
|
|
72
|
+
const sx = Math.floor((startX - origin.x) / TILE);
|
|
73
|
+
const sy = Math.floor((startY - origin.y) / TILE);
|
|
74
|
+
const ex = Math.floor((endX - origin.x) / TILE);
|
|
75
|
+
const ey = Math.floor((endY - origin.y) / TILE);
|
|
76
|
+
|
|
77
|
+
// Clamp to grid bounds
|
|
78
|
+
const clamp = (v, max) => Math.max(0, Math.min(max - 1, v));
|
|
79
|
+
const gsx = clamp(sx, width);
|
|
80
|
+
const gsy = clamp(sy, height);
|
|
81
|
+
const gex = clamp(ex, width);
|
|
82
|
+
const gey = clamp(ey, height);
|
|
83
|
+
|
|
84
|
+
// If start == end, no path needed
|
|
85
|
+
if (gsx === gex && gsy === gey) return [{ x: endX, y: endY }];
|
|
86
|
+
|
|
87
|
+
// A* search
|
|
88
|
+
const open = new PriorityQueue();
|
|
89
|
+
const cameFrom = {};
|
|
90
|
+
const gScore = {};
|
|
91
|
+
const key = (x, y) => `${x},${y}`;
|
|
92
|
+
|
|
93
|
+
gScore[key(gsx, gsy)] = 0;
|
|
94
|
+
open.push({ x: gsx, y: gsy }, 0);
|
|
95
|
+
|
|
96
|
+
const heuristic = (x, y) => Math.abs(x - gex) + Math.abs(y - gey);
|
|
97
|
+
const dirs = [[0, 1], [1, 0], [0, -1], [-1, 0]]; // 4-directional
|
|
98
|
+
|
|
99
|
+
while (open.length > 0) {
|
|
100
|
+
const curr = open.pop();
|
|
101
|
+
if (curr.x === gex && curr.y === gey) {
|
|
102
|
+
// Reconstruct path
|
|
103
|
+
const path = [];
|
|
104
|
+
let node = key(gex, gey);
|
|
105
|
+
while (node && node !== key(gsx, gsy)) {
|
|
106
|
+
const [nx, ny] = node.split(',').map(Number);
|
|
107
|
+
path.unshift({
|
|
108
|
+
x: origin.x + nx * TILE + TILE / 2,
|
|
109
|
+
y: origin.y + ny * TILE + TILE / 2
|
|
110
|
+
});
|
|
111
|
+
node = cameFrom[node];
|
|
112
|
+
}
|
|
113
|
+
return path.length > 0 ? path : [{ x: endX, y: endY }];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
for (const [dx, dy] of dirs) {
|
|
117
|
+
const nx = curr.x + dx;
|
|
118
|
+
const ny = curr.y + dy;
|
|
119
|
+
if (nx < 0 || nx >= width || ny < 0 || ny >= height) continue;
|
|
120
|
+
if (!grid[ny][nx]) continue; // blocked
|
|
121
|
+
|
|
122
|
+
const nk = key(nx, ny);
|
|
123
|
+
const tentG = (gScore[key(curr.x, curr.y)] || 0) + 1;
|
|
124
|
+
if (gScore[nk] === undefined || tentG < gScore[nk]) {
|
|
125
|
+
gScore[nk] = tentG;
|
|
126
|
+
cameFrom[nk] = key(curr.x, curr.y);
|
|
127
|
+
open.push({ x: nx, y: ny }, tentG + heuristic(nx, ny));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// No path found — fallback to direct
|
|
133
|
+
return [{ x: endX, y: endY }];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Singleton
|
|
138
|
+
let _instance = null;
|
|
139
|
+
export function getPathfinder() {
|
|
140
|
+
if (!_instance) _instance = new Pathfinder();
|
|
141
|
+
return _instance;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { TILE };
|