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.
Files changed (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +584 -0
  3. package/bin/aicc.js +772 -0
  4. package/lib/actions/approve.js +71 -0
  5. package/lib/actions/assign-project.js +132 -0
  6. package/lib/actions/browser-test.js +64 -0
  7. package/lib/actions/cleanup.js +174 -0
  8. package/lib/actions/debug.js +298 -0
  9. package/lib/actions/deploy.js +1229 -0
  10. package/lib/actions/fix-bug.js +134 -0
  11. package/lib/actions/new-feature.js +255 -0
  12. package/lib/actions/reject.js +307 -0
  13. package/lib/actions/review.js +706 -0
  14. package/lib/actions/status.js +47 -0
  15. package/lib/agents/browser-qa-agent.js +611 -0
  16. package/lib/agents/payment-agent.js +116 -0
  17. package/lib/agents/suggestion-agent.js +88 -0
  18. package/lib/cli.js +303 -0
  19. package/lib/config.js +243 -0
  20. package/lib/hub/hub-server.js +440 -0
  21. package/lib/hub/project-poller.js +75 -0
  22. package/lib/hub/skill-registry.js +89 -0
  23. package/lib/hub/state-aggregator.js +204 -0
  24. package/lib/index.js +471 -0
  25. package/lib/init/doctor.js +523 -0
  26. package/lib/init/presets.js +222 -0
  27. package/lib/init/skill-fetcher.js +77 -0
  28. package/lib/init/wizard.js +973 -0
  29. package/lib/integrations/codex-runner.js +128 -0
  30. package/lib/integrations/github-actions.js +248 -0
  31. package/lib/integrations/github-reporter.js +229 -0
  32. package/lib/integrations/screenshot-store.js +102 -0
  33. package/lib/openclaw/bridge.js +650 -0
  34. package/lib/openclaw/generate-skill.js +235 -0
  35. package/lib/openclaw/openclaw.json +64 -0
  36. package/lib/orchestrator/autonomous-loop.js +429 -0
  37. package/lib/orchestrator/thread-triggers.js +63 -0
  38. package/lib/roleplay/agent-messenger.js +75 -0
  39. package/lib/roleplay/discussion-threads.js +303 -0
  40. package/lib/roleplay/health-monitor.js +121 -0
  41. package/lib/roleplay/pm-agent.js +513 -0
  42. package/lib/roleplay/roleplay-config.js +25 -0
  43. package/lib/roleplay/room.js +164 -0
  44. package/lib/shared/action-runner.js +2330 -0
  45. package/lib/shared/event-bus.js +185 -0
  46. package/lib/slack/bot.js +378 -0
  47. package/lib/telegram/bot.js +416 -0
  48. package/lib/telegram/commands.js +1267 -0
  49. package/lib/telegram/keyboards.js +113 -0
  50. package/lib/telegram/notifications.js +247 -0
  51. package/lib/twitch/bot.js +354 -0
  52. package/lib/twitch/commands.js +302 -0
  53. package/lib/twitch/notifications.js +63 -0
  54. package/lib/utils/achievements.js +191 -0
  55. package/lib/utils/activity-log.js +182 -0
  56. package/lib/utils/agent-leaderboard.js +119 -0
  57. package/lib/utils/audit-logger.js +232 -0
  58. package/lib/utils/codebase-context.js +288 -0
  59. package/lib/utils/codebase-indexer.js +381 -0
  60. package/lib/utils/config-schema.js +230 -0
  61. package/lib/utils/context-compressor.js +172 -0
  62. package/lib/utils/correlation.js +63 -0
  63. package/lib/utils/cost-tracker.js +423 -0
  64. package/lib/utils/cron-scheduler.js +53 -0
  65. package/lib/utils/db-adapter.js +293 -0
  66. package/lib/utils/display.js +272 -0
  67. package/lib/utils/errors.js +116 -0
  68. package/lib/utils/format.js +134 -0
  69. package/lib/utils/intent-engine.js +464 -0
  70. package/lib/utils/mcp-client.js +238 -0
  71. package/lib/utils/model-ab-test.js +164 -0
  72. package/lib/utils/notify.js +122 -0
  73. package/lib/utils/persona-loader.js +80 -0
  74. package/lib/utils/pipeline-lock.js +73 -0
  75. package/lib/utils/pipeline.js +214 -0
  76. package/lib/utils/plugin-runner.js +234 -0
  77. package/lib/utils/rate-limiter.js +84 -0
  78. package/lib/utils/rbac.js +74 -0
  79. package/lib/utils/runner.js +1809 -0
  80. package/lib/utils/security.js +191 -0
  81. package/lib/utils/self-healer.js +144 -0
  82. package/lib/utils/skill-loader.js +255 -0
  83. package/lib/utils/spinner.js +132 -0
  84. package/lib/utils/stage-queue.js +50 -0
  85. package/lib/utils/state-machine.js +89 -0
  86. package/lib/utils/status-bar.js +327 -0
  87. package/lib/utils/token-estimator.js +101 -0
  88. package/lib/utils/ux-analyzer.js +101 -0
  89. package/lib/utils/webhook-emitter.js +83 -0
  90. package/lib/web/public/css/styles.css +417 -0
  91. package/lib/web/public/dark-mode.js +44 -0
  92. package/lib/web/public/hub/kanban.html +206 -0
  93. package/lib/web/public/index.html +45 -0
  94. package/lib/web/public/js/app.js +71 -0
  95. package/lib/web/public/js/ask.js +110 -0
  96. package/lib/web/public/js/dashboard.js +165 -0
  97. package/lib/web/public/js/deploy.js +72 -0
  98. package/lib/web/public/js/feature.js +79 -0
  99. package/lib/web/public/js/health.js +65 -0
  100. package/lib/web/public/js/logs.js +93 -0
  101. package/lib/web/public/js/review.js +123 -0
  102. package/lib/web/public/js/ws-client.js +82 -0
  103. package/lib/web/public/office/css/office.css +678 -0
  104. package/lib/web/public/office/index.html +148 -0
  105. package/lib/web/public/office/js/achievements-ui.js +117 -0
  106. package/lib/web/public/office/js/character.js +1056 -0
  107. package/lib/web/public/office/js/chat-bubbles.js +177 -0
  108. package/lib/web/public/office/js/cost-overlay.js +123 -0
  109. package/lib/web/public/office/js/day-night.js +68 -0
  110. package/lib/web/public/office/js/effects.js +632 -0
  111. package/lib/web/public/office/js/engine.js +146 -0
  112. package/lib/web/public/office/js/feature-ticket.js +216 -0
  113. package/lib/web/public/office/js/hub-client.js +60 -0
  114. package/lib/web/public/office/js/main.js +1757 -0
  115. package/lib/web/public/office/js/office-layout.js +1524 -0
  116. package/lib/web/public/office/js/pathfinding.js +144 -0
  117. package/lib/web/public/office/js/pixel-sprites.js +1454 -0
  118. package/lib/web/public/office/js/progress-bars.js +117 -0
  119. package/lib/web/public/office/js/replay.js +191 -0
  120. package/lib/web/public/office/js/sound-effects.js +91 -0
  121. package/lib/web/public/office/js/sprite-renderer.js +211 -0
  122. package/lib/web/public/office/js/stamina-system.js +89 -0
  123. package/lib/web/public/office/js/ui.js +107 -0
  124. package/lib/web/public/onboarding/index.html +243 -0
  125. package/lib/web/public/timeline/index.html +195 -0
  126. package/lib/web/routes/api.js +499 -0
  127. package/lib/web/routes/logs.js +20 -0
  128. package/lib/web/routes/metrics.js +99 -0
  129. package/lib/web/server.js +183 -0
  130. package/lib/web/ws/handler.js +65 -0
  131. package/package.json +67 -0
  132. package/templates/agent-architect.md +69 -0
  133. package/templates/agent-gemini-pm.md +49 -0
  134. package/templates/agent-gemini-reviewer.md +52 -0
  135. package/templates/copilot-instructions.md +36 -0
  136. package/templates/pipelines/mobile.json +27 -0
  137. package/templates/pipelines/nodejs-api.json +27 -0
  138. package/templates/pipelines/python.json +27 -0
  139. package/templates/pipelines/react.json +27 -0
  140. package/templates/pipelines/salesforce.json +27 -0
  141. package/templates/role-gemini.md +97 -0
  142. package/templates/skill-architect.md +114 -0
  143. package/templates/skill-browser-qa.md +50 -0
  144. package/templates/skill-bug-from-qa.md +58 -0
  145. package/templates/skill-chatbot.md +93 -0
  146. package/templates/skill-implement.md +78 -0
  147. package/templates/skill-openclaw.md +174 -0
  148. package/templates/skill-payment.md +110 -0
  149. package/templates/skill-pm-spec.md +77 -0
  150. package/templates/skill-requirement-capture.md +97 -0
  151. package/templates/skill-review.md +108 -0
  152. package/templates/skill-reviewer-qa.md +44 -0
  153. package/templates/skill-suggestion.md +45 -0
  154. 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 };