opencroc 1.8.0 → 1.8.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 (71) hide show
  1. package/dist/cli/index.js +1107 -49
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/index.d.ts +128 -1
  4. package/dist/index.js +548 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/web/dist/assets/main-Ccg3eDNK.js +1 -0
  7. package/dist/web/dist/assets/office-runtime-B3iNctxE.css +1 -0
  8. package/dist/web/dist/assets/office-runtime-BsCh82Pj.js +183 -0
  9. package/dist/web/dist/assets/pixel-page-3BYGm7dH.js +470 -0
  10. package/dist/web/dist/assets/react-vendor-C8RhVn0h.js +49 -0
  11. package/dist/web/dist/assets/studio-page-BInoyoV2.css +1 -0
  12. package/dist/web/dist/assets/studio-page-o3SCvE_v.js +351 -0
  13. package/dist/web/dist/assets/three-addons-BdrPp04O.js +470 -0
  14. package/dist/web/dist/assets/three-core-CsxM1PCY.js +4057 -0
  15. package/dist/web/dist/index.html +15 -0
  16. package/dist/web/index.html +11 -572
  17. package/dist/web/public/botreview/char_0.png +0 -0
  18. package/dist/web/public/botreview/char_1.png +0 -0
  19. package/dist/web/public/botreview/char_2.png +0 -0
  20. package/dist/web/public/botreview/coffee-machine.gif +0 -0
  21. package/dist/web/public/botreview/server.gif +0 -0
  22. package/dist/web/public/botreview/walls.png +0 -0
  23. package/dist/web/public/star/desk-v3.webp +0 -0
  24. package/dist/web/public/star/office_bg_small.webp +0 -0
  25. package/dist/web/public/star/star-idle-v5.png +0 -0
  26. package/dist/web/public/star/star-working-spritesheet-grid.webp +0 -0
  27. package/dist/web/src/app/AppLayout.tsx +34 -0
  28. package/dist/web/src/app/AppRouter.tsx +46 -0
  29. package/dist/web/src/app/bootstrap.tsx +22 -0
  30. package/dist/web/src/app/routes.tsx +52 -0
  31. package/dist/web/src/features/office/runtime/index.ts +1 -0
  32. package/dist/web/src/features/office/runtime/mount.ts +809 -0
  33. package/dist/web/src/features/pixel/runtime/index.ts +1 -0
  34. package/dist/web/src/features/pixel/runtime/mount.ts +728 -0
  35. package/dist/web/src/features/studio/runtime/index.ts +1 -0
  36. package/dist/web/src/features/studio/runtime/mount.ts +664 -0
  37. package/dist/web/src/features/three/engine/index.ts +1 -0
  38. package/dist/web/src/main.tsx +7 -0
  39. package/dist/web/src/pages/office/index.ts +1 -0
  40. package/dist/web/src/pages/office/page.tsx +283 -0
  41. package/dist/web/src/pages/pixel/index.ts +1 -0
  42. package/dist/web/src/pages/pixel/page.tsx +564 -0
  43. package/dist/web/src/pages/studio/index.ts +1 -0
  44. package/dist/web/src/pages/studio/page.tsx +446 -0
  45. package/dist/web/{js/agents.js → src/runtime/agents.ts} +304 -31
  46. package/dist/web/{js/camera.js → src/runtime/camera.ts} +12 -5
  47. package/dist/web/{js/dataviz.js → src/runtime/dataviz.ts} +38 -14
  48. package/dist/web/{js/effects.js → src/runtime/effects.ts} +139 -2
  49. package/dist/web/{js/engine.js → src/runtime/engine.ts} +45 -6
  50. package/dist/web/{js/office.js → src/runtime/office.ts} +136 -20
  51. package/dist/web/{js/ui.js → src/runtime/ui.ts} +11 -7
  52. package/dist/web/src/shared/assets.ts +4 -0
  53. package/dist/web/src/shared/navigation.ts +47 -0
  54. package/dist/web/src/styles/app-layout.css +19 -0
  55. package/dist/web/src/styles/office.css +268 -0
  56. package/dist/web/tsconfig.json +28 -0
  57. package/dist/web/vite.config.ts +93 -0
  58. package/package.json +11 -2
  59. package/dist/web/index-studio.html +0 -804
  60. package/dist/web/index-v2-pixel.html +0 -1571
  61. /package/dist/web/{assets → dist}/botreview/char_0.png +0 -0
  62. /package/dist/web/{assets → dist}/botreview/char_1.png +0 -0
  63. /package/dist/web/{assets → dist}/botreview/char_2.png +0 -0
  64. /package/dist/web/{assets → dist}/botreview/coffee-machine.gif +0 -0
  65. /package/dist/web/{assets → dist}/botreview/server.gif +0 -0
  66. /package/dist/web/{assets → dist}/botreview/walls.png +0 -0
  67. /package/dist/web/{assets → dist}/star/desk-v3.webp +0 -0
  68. /package/dist/web/{assets → dist}/star/office_bg_small.webp +0 -0
  69. /package/dist/web/{assets → dist}/star/star-idle-v5.png +0 -0
  70. /package/dist/web/{assets → dist}/star/star-working-spritesheet-grid.webp +0 -0
  71. /package/dist/web/{js/state.js → src/runtime/state.ts} +0 -0
@@ -0,0 +1,283 @@
1
+ import { useEffect } from 'react';
2
+ import '@styles/office.css';
3
+
4
+ function CrocMark() {
5
+ return (
6
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
7
+ <rect x="2" y="4" width="12" height="10" rx="1" stroke="currentColor" strokeWidth="1.5" />
8
+ <circle cx="8" cy="9" r="2.5" fill="currentColor" />
9
+ <rect x="5" y="2" width="6" height="2" rx="0.5" fill="currentColor" opacity="0.6" />
10
+ </svg>
11
+ );
12
+ }
13
+
14
+ function View3dIcon() {
15
+ return (
16
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
17
+ <path d="M8 1L14.5 5v6L8 15 1.5 11V5z" stroke="currentColor" strokeWidth="1.2" />
18
+ <path d="M8 1v14M1.5 5L8 9l6.5-4" stroke="currentColor" strokeWidth="1" opacity="0.5" />
19
+ </svg>
20
+ );
21
+ }
22
+
23
+ function GraphIcon() {
24
+ return (
25
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
26
+ <circle cx="4" cy="4" r="2" fill="currentColor" opacity="0.6" />
27
+ <circle cx="12" cy="4" r="2" fill="currentColor" opacity="0.6" />
28
+ <circle cx="8" cy="12" r="2" fill="currentColor" opacity="0.6" />
29
+ <line x1="4" y1="6" x2="8" y2="10" stroke="currentColor" strokeWidth="1" />
30
+ <line x1="12" y1="6" x2="8" y2="10" stroke="currentColor" strokeWidth="1" />
31
+ </svg>
32
+ );
33
+ }
34
+
35
+ function MoonIcon() {
36
+ return (
37
+ <svg id="theme-icon-dark" viewBox="0 0 16 16" fill="none" aria-hidden="true">
38
+ <path d="M8 1a7 7 0 100 14 5 5 0 010-14z" fill="currentColor" />
39
+ </svg>
40
+ );
41
+ }
42
+
43
+ function SunIcon() {
44
+ return (
45
+ <svg id="theme-icon-light" viewBox="0 0 16 16" fill="none" style={{ display: 'none' }} aria-hidden="true">
46
+ <circle cx="8" cy="8" r="3" fill="currentColor" />
47
+ <g stroke="currentColor" strokeWidth="1.5" strokeLinecap="round">
48
+ <line x1="8" y1="1" x2="8" y2="3" />
49
+ <line x1="8" y1="13" x2="8" y2="15" />
50
+ <line x1="1" y1="8" x2="3" y2="8" />
51
+ <line x1="13" y1="8" x2="15" y2="8" />
52
+ <line x1="3.05" y1="3.05" x2="4.46" y2="4.46" />
53
+ <line x1="11.54" y1="11.54" x2="12.95" y2="12.95" />
54
+ <line x1="3.05" y1="12.95" x2="4.46" y2="11.54" />
55
+ <line x1="11.54" y1="4.46" x2="12.95" y2="3.05" />
56
+ </g>
57
+ </svg>
58
+ );
59
+ }
60
+
61
+ export default function OfficePage() {
62
+ useEffect(() => {
63
+ let dispose: (() => void) | undefined;
64
+ let cancelled = false;
65
+
66
+ void import('@features/office/runtime').then(({ mountOfficeRuntime }) => {
67
+ return mountOfficeRuntime();
68
+ }).then((cleanup) => {
69
+ if (cancelled) {
70
+ cleanup();
71
+ return;
72
+ }
73
+ dispose = cleanup;
74
+ });
75
+
76
+ return () => {
77
+ cancelled = true;
78
+ dispose?.();
79
+ };
80
+ }, []);
81
+
82
+ return (
83
+ <>
84
+ <div className="loading-overlay" id="loading-overlay">
85
+ <div style={{ width: 48, height: 48, opacity: 0.8, color: 'var(--accent)' }}>
86
+ <CrocMark />
87
+ </div>
88
+ <div className="loading-bar">
89
+ <div className="fill" id="loading-fill" />
90
+ </div>
91
+ <div className="loading-text" id="loading-text">
92
+ Initializing 3D engine...
93
+ </div>
94
+ </div>
95
+
96
+ <canvas id="three-canvas" />
97
+
98
+ <div className="header" id="header">
99
+ <div className="logo">
100
+ <CrocMark />
101
+ </div>
102
+ <div className="title-wrap">
103
+ <h1>OpenCroc Studio</h1>
104
+ <span className="subtitle">3D Ops Dashboard | Real-time Multi-Agent Runtime</span>
105
+ </div>
106
+ <div className="h-divider" />
107
+ <div className="view-switch">
108
+ <button id="view-3d" className="active" type="button">
109
+ <View3dIcon />
110
+ 3D Office
111
+ </button>
112
+ <button id="view-graph" type="button">
113
+ <GraphIcon />
114
+ Graph
115
+ </button>
116
+ </div>
117
+ <div className="h-divider" />
118
+ <div className="actions">
119
+ <button className="btn btn-secondary" id="btn-scan" type="button">
120
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
121
+ <path d="M2 8h12M4 4h8M6 12h4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
122
+ </svg>
123
+ Scan
124
+ </button>
125
+ <button className="btn btn-primary" id="btn-pipeline" type="button">
126
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
127
+ <path d="M2 8h3l2-4 2 8 2-4h3" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
128
+ </svg>
129
+ Pipeline
130
+ </button>
131
+ <div className="run-mode-wrap">
132
+ <select id="run-mode" defaultValue="auto">
133
+ <option value="auto">Auto</option>
134
+ <option value="reuse">Reuse</option>
135
+ <option value="managed">Managed</option>
136
+ </select>
137
+ </div>
138
+ <button className="btn btn-secondary" id="btn-run-tests" type="button">
139
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
140
+ <path d="M4 2v12l8-6z" fill="currentColor" opacity="0.7" />
141
+ </svg>
142
+ Tests
143
+ </button>
144
+ <button className="btn btn-secondary" id="btn-reports" type="button">
145
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
146
+ <rect x="3" y="1" width="10" height="14" rx="1" stroke="currentColor" strokeWidth="1.2" />
147
+ <line x1="5" y1="5" x2="11" y2="5" stroke="currentColor" strokeWidth="1" opacity="0.5" />
148
+ <line x1="5" y1="8" x2="11" y2="8" stroke="currentColor" strokeWidth="1" opacity="0.5" />
149
+ <line x1="5" y1="11" x2="9" y2="11" stroke="currentColor" strokeWidth="1" opacity="0.5" />
150
+ </svg>
151
+ Reports
152
+ </button>
153
+ <button className="btn btn-danger" id="btn-reset" type="button">
154
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
155
+ <path d="M2 8a6 6 0 0111.3-2.8M14 8a6 6 0 01-11.3 2.8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
156
+ <path d="M14 2v4h-4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
157
+ </svg>
158
+ Reset
159
+ </button>
160
+ </div>
161
+ <div className="stats">
162
+ <div className="stat-box">
163
+ <span className="stat-label">MODULES</span>
164
+ <span className="stat-value" id="s-mod">0</span>
165
+ </div>
166
+ <div className="stat-box">
167
+ <span className="stat-label">CLASSES</span>
168
+ <span className="stat-value" id="s-mdl">0</span>
169
+ </div>
170
+ <div className="stat-box">
171
+ <span className="stat-label">FUNCS</span>
172
+ <span className="stat-value" id="s-api">0</span>
173
+ </div>
174
+ <div className="stat-box">
175
+ <span className="stat-label">FILES</span>
176
+ <span className="stat-value" id="s-files">-</span>
177
+ </div>
178
+ <div className="stat-box">
179
+ <span className="stat-label">NODES</span>
180
+ <span className="stat-value" id="s-nodes">-</span>
181
+ </div>
182
+ <div className="stat-box">
183
+ <span className="stat-label">RISKS</span>
184
+ <span className="stat-value" id="s-risks">-</span>
185
+ </div>
186
+ </div>
187
+ <div className="header-end">
188
+ <button id="theme-toggle" title="Toggle theme" type="button">
189
+ <MoonIcon />
190
+ <SunIcon />
191
+ </button>
192
+ <div id="conn-dot" title="WebSocket" />
193
+ </div>
194
+ </div>
195
+
196
+ <div className="sidebar" id="sidebar">
197
+ <div className="sidebar-header">
198
+ <h3>Modules</h3>
199
+ <button className="sidebar-toggle" id="sidebar-toggle" type="button">
200
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
201
+ <path d="M10 3L5 8l5 5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
202
+ </svg>
203
+ </button>
204
+ </div>
205
+ <div className="sidebar-content" id="sidebar-content">
206
+ <div id="mod-list" />
207
+ <div id="agent-sidebar" style={{ marginTop: 12 }} />
208
+ </div>
209
+ </div>
210
+
211
+ <div className="right-panel" id="right-panel">
212
+ <div className="panel-tabs">
213
+ <button className="tab active" data-tab="log" type="button">
214
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
215
+ <path d="M2 3h12M2 7h8M2 11h10" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" />
216
+ </svg>
217
+ Log
218
+ </button>
219
+ <button className="tab" data-tab="files" type="button">
220
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
221
+ <path d="M3 1h6l4 4v10H3z" stroke="currentColor" strokeWidth="1.2" />
222
+ <path d="M9 1v4h4" stroke="currentColor" strokeWidth="1" opacity="0.5" />
223
+ </svg>
224
+ Files
225
+ </button>
226
+ <button className="tab" data-tab="results" type="button">
227
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
228
+ <polyline points="2,12 5,6 9,10 14,3" stroke="currentColor" strokeWidth="1.5" fill="none" strokeLinecap="round" strokeLinejoin="round" />
229
+ </svg>
230
+ Results
231
+ </button>
232
+ <button className="tab" data-tab="reports" type="button">
233
+ <svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
234
+ <rect x="2" y="2" width="12" height="12" rx="1" stroke="currentColor" strokeWidth="1.2" />
235
+ <path d="M5 10V7M8 10V5M11 10V8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
236
+ </svg>
237
+ Reports
238
+ </button>
239
+ </div>
240
+ <div className="panel-content" id="log-list" />
241
+ <div className="panel-content hidden" id="file-list" />
242
+ <div className="panel-content hidden" id="results-panel" />
243
+ <div className="panel-content hidden" id="reports-panel" />
244
+ </div>
245
+
246
+ <div className="file-preview" id="file-preview">
247
+ <div className="backdrop" id="fp-backdrop" />
248
+ <div className="fp-dialog">
249
+ <div className="fp-header">
250
+ <span className="fp-title" id="fp-title">File Preview</span>
251
+ <button className="fp-close" id="fp-close" type="button">
252
+ <svg viewBox="0 0 16 16" width="14" height="14" fill="none" aria-hidden="true">
253
+ <path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
254
+ </svg>
255
+ </button>
256
+ </div>
257
+ <pre className="fp-code" id="fp-code" />
258
+ </div>
259
+ </div>
260
+
261
+ <div className="tooltip" id="tooltip">
262
+ <div className="tt-name" />
263
+ <div className="tt-module" />
264
+ <div className="tt-type" />
265
+ </div>
266
+
267
+ <div className="shortcut-legend" id="shortcut-legend">
268
+ <kbd>1</kbd><span>3D Office</span>
269
+ <kbd>2</kbd><span>Graph View</span>
270
+ <kbd>S</kbd><span>Scan</span>
271
+ <kbd>P</kbd><span>Pipeline</span>
272
+ <kbd>T</kbd><span>Run Tests</span>
273
+ <kbd>R</kbd><span>Reports</span>
274
+ <kbd>X</kbd><span>Reset</span>
275
+ <kbd>D</kbd><span>Dark/Light</span>
276
+ <kbd>?</kbd><span>Shortcuts</span>
277
+ <kbd>Esc</kbd><span>Close</span>
278
+ </div>
279
+
280
+ <div className="toast-container" id="toast-container" />
281
+ </>
282
+ );
283
+ }
@@ -0,0 +1 @@
1
+ export { default } from './page';