declare-cc 0.4.3 → 0.4.8

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.
@@ -0,0 +1,700 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Declare — Project DAG</title>
7
+ <style>
8
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
9
+
10
+ :root {
11
+ --bg: #0e0e12;
12
+ --surface: #16161e;
13
+ --surface2: #1e1e2a;
14
+ --border: #2a2a38;
15
+ --text: #c8c8d8;
16
+ --text-dim: #6e6e88;
17
+ --text-bright: #e8e8f0;
18
+
19
+ --decl-color: #4a9eff;
20
+ --decl-bg: #0d2240;
21
+ --decl-border: #1a4880;
22
+
23
+ --mile-color: #a66bff;
24
+ --mile-bg: #1a0d33;
25
+ --mile-border: #3d1f6e;
26
+
27
+ --act-color: #34d399;
28
+ --act-bg: #0a2018;
29
+ --act-border: #1a4d34;
30
+
31
+ /* done tones — dimmed hue-specific variants, not grey */
32
+ --decl-done-color: #4a7ab8;
33
+ --decl-done-bg: #0a1c2e;
34
+ --decl-done-border: #163454;
35
+
36
+ --mile-done-color: #7050b8;
37
+ --mile-done-bg: #130c28;
38
+ --mile-done-border: #251848;
39
+
40
+ --act-done-color: #26906a;
41
+ --act-done-bg: #08180f;
42
+ --act-done-border: #123428;
43
+
44
+ --broken-color: #ff4d6d;
45
+ --broken-bg: #2a0a10;
46
+ --broken-border: #5a1520;
47
+
48
+ --renegotiated-color: #ffa040;
49
+ --renegotiated-bg: #251400;
50
+ --renegotiated-border: #5a3000;
51
+
52
+ --panel-width: 360px;
53
+ --status-bar-height: 52px;
54
+ }
55
+
56
+ body {
57
+ background: var(--bg);
58
+ color: var(--text);
59
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
60
+ font-size: 13px;
61
+ line-height: 1.5;
62
+ height: 100vh;
63
+ display: flex;
64
+ flex-direction: column;
65
+ overflow: hidden;
66
+ }
67
+
68
+ /* ── Status bar ── */
69
+ #status-bar {
70
+ height: var(--status-bar-height);
71
+ background: var(--surface);
72
+ border-bottom: 1px solid var(--border);
73
+ display: flex;
74
+ align-items: center;
75
+ gap: 24px;
76
+ padding: 0 20px;
77
+ flex-shrink: 0;
78
+ position: relative;
79
+ z-index: 10;
80
+ }
81
+
82
+ #status-bar .project-name {
83
+ font-weight: 600;
84
+ font-size: 14px;
85
+ color: var(--text-bright);
86
+ margin-right: 8px;
87
+ }
88
+
89
+ .stat-group {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 6px;
93
+ color: var(--text-dim);
94
+ font-size: 12px;
95
+ }
96
+
97
+ .stat-group .value {
98
+ font-weight: 600;
99
+ color: var(--text);
100
+ }
101
+
102
+ .health-badge {
103
+ padding: 2px 10px;
104
+ border-radius: 12px;
105
+ font-size: 11px;
106
+ font-weight: 600;
107
+ text-transform: uppercase;
108
+ letter-spacing: 0.06em;
109
+ }
110
+ .health-healthy { background: #0a2018; color: #34d399; border: 1px solid #1a4d34; }
111
+ .health-warnings { background: #251400; color: #ffa040; border: 1px solid #5a3000; }
112
+ .health-errors { background: #2a0a10; color: #ff4d6d; border: 1px solid #5a1520; }
113
+ .health-unknown { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
114
+
115
+ .spacer { flex: 1; }
116
+
117
+ #last-updated {
118
+ color: var(--text-dim);
119
+ font-size: 11px;
120
+ white-space: nowrap;
121
+ }
122
+
123
+ #refresh-btn {
124
+ background: var(--surface2);
125
+ border: 1px solid var(--border);
126
+ color: var(--text);
127
+ padding: 5px 14px;
128
+ border-radius: 6px;
129
+ cursor: pointer;
130
+ font-size: 12px;
131
+ transition: background 0.15s, border-color 0.15s;
132
+ }
133
+ #refresh-btn:hover { background: #252535; border-color: #3a3a50; }
134
+ #refresh-btn:active { transform: scale(0.97); }
135
+
136
+ /* ── Main layout ── */
137
+ #main {
138
+ flex: 1;
139
+ overflow: hidden;
140
+ }
141
+
142
+ /* ── Canvas area — reserve space for fixed sidebar ── */
143
+ #canvas-wrap {
144
+ width: 100%;
145
+ height: 100%;
146
+ overflow: auto;
147
+ background: var(--bg);
148
+ padding-right: var(--panel-width);
149
+ padding-bottom: 40px; /* room for activity feed */
150
+ }
151
+
152
+ #canvas-container {
153
+ position: relative;
154
+ min-width: 100%;
155
+ min-height: 100%;
156
+ padding: 40px 40px 80px;
157
+ }
158
+
159
+ #edges-svg {
160
+ position: absolute;
161
+ top: 0;
162
+ left: 0;
163
+ width: 100%;
164
+ height: 100%;
165
+ pointer-events: none;
166
+ overflow: visible;
167
+ }
168
+
169
+ /* ── Layers ── */
170
+ .layer {
171
+ display: flex;
172
+ flex-wrap: wrap;
173
+ gap: 0;
174
+ justify-content: center;
175
+ align-items: flex-start;
176
+ position: relative;
177
+ margin-bottom: 0;
178
+ }
179
+
180
+ .layer-label {
181
+ font-size: 10px;
182
+ font-weight: 700;
183
+ letter-spacing: 0.12em;
184
+ text-transform: uppercase;
185
+ color: var(--text-dim);
186
+ text-align: center;
187
+ margin-bottom: 12px;
188
+ }
189
+
190
+ .layer-section {
191
+ margin-bottom: 40px;
192
+ }
193
+
194
+ /* ── Nodes ── */
195
+ .node {
196
+ border-radius: 10px;
197
+ padding: 12px 16px;
198
+ cursor: pointer;
199
+ transition: transform 0.12s, box-shadow 0.12s, border-color 0.15s;
200
+ position: relative;
201
+ min-width: 160px;
202
+ max-width: 220px;
203
+ user-select: none;
204
+ margin: 0 8px 0 8px;
205
+ }
206
+
207
+ .node:hover {
208
+ transform: translateY(-2px);
209
+ box-shadow: 0 6px 24px rgba(0,0,0,0.5);
210
+ }
211
+
212
+ .node.selected {
213
+ box-shadow: 0 0 0 2px currentColor, 0 6px 24px rgba(0,0,0,0.5);
214
+ }
215
+
216
+ /* Declaration nodes */
217
+ .node-declaration {
218
+ background: var(--decl-bg);
219
+ border: 1px solid var(--decl-border);
220
+ color: var(--decl-color);
221
+ }
222
+
223
+ /* Milestone nodes */
224
+ .node-milestone {
225
+ background: var(--mile-bg);
226
+ border: 1px solid var(--mile-border);
227
+ color: var(--mile-color);
228
+ }
229
+
230
+ /* Action nodes */
231
+ .node-action {
232
+ background: var(--act-bg);
233
+ border: 1px solid var(--act-border);
234
+ color: var(--act-color);
235
+ min-width: 140px;
236
+ max-width: 190px;
237
+ }
238
+
239
+ /* Status overrides — DONE uses dimmed type-specific hues, not grey */
240
+ .node-declaration.status-done,
241
+ .node-declaration.status-honored,
242
+ .node-declaration.status-kept {
243
+ background: var(--decl-done-bg);
244
+ border-color: var(--decl-done-border);
245
+ color: var(--decl-done-color);
246
+ opacity: 0.82;
247
+ }
248
+
249
+ .node-milestone.status-done,
250
+ .node-milestone.status-honored,
251
+ .node-milestone.status-kept {
252
+ background: var(--mile-done-bg);
253
+ border-color: var(--mile-done-border);
254
+ color: var(--mile-done-color);
255
+ opacity: 0.82;
256
+ }
257
+
258
+ .node-action.status-done,
259
+ .node-action.status-honored,
260
+ .node-action.status-kept {
261
+ background: var(--act-done-bg);
262
+ border-color: var(--act-done-border);
263
+ color: var(--act-done-color);
264
+ opacity: 0.82;
265
+ }
266
+
267
+ .node.status-broken {
268
+ background: var(--broken-bg);
269
+ border-color: var(--broken-border);
270
+ color: var(--broken-color);
271
+ }
272
+
273
+ .node.status-renegotiated {
274
+ background: var(--renegotiated-bg);
275
+ border-color: var(--renegotiated-border);
276
+ color: var(--renegotiated-color);
277
+ }
278
+
279
+ .node-id {
280
+ font-size: 10px;
281
+ font-weight: 700;
282
+ letter-spacing: 0.06em;
283
+ opacity: 0.7;
284
+ margin-bottom: 4px;
285
+ }
286
+
287
+ .node-title {
288
+ font-size: 12px;
289
+ font-weight: 500;
290
+ color: var(--text-bright);
291
+ line-height: 1.35;
292
+ word-break: break-word;
293
+ }
294
+
295
+ .node-declaration.status-done .node-title,
296
+ .node-declaration.status-honored .node-title,
297
+ .node-declaration.status-kept .node-title { color: var(--decl-done-color); }
298
+
299
+ .node-milestone.status-done .node-title,
300
+ .node-milestone.status-honored .node-title,
301
+ .node-milestone.status-kept .node-title { color: var(--mile-done-color); }
302
+
303
+ .node-action.status-done .node-title,
304
+ .node-action.status-honored .node-title,
305
+ .node-action.status-kept .node-title { color: var(--act-done-color); }
306
+
307
+ .node.status-broken .node-title { color: var(--broken-color); }
308
+ .node.status-renegotiated .node-title { color: var(--renegotiated-color); }
309
+
310
+ .status-badge {
311
+ display: inline-block;
312
+ margin-top: 8px;
313
+ padding: 2px 8px;
314
+ border-radius: 8px;
315
+ font-size: 10px;
316
+ font-weight: 700;
317
+ letter-spacing: 0.05em;
318
+ text-transform: uppercase;
319
+ background: rgba(255,255,255,0.06);
320
+ }
321
+
322
+ /* ── Side panel — always visible, fixed right column ── */
323
+ #side-panel {
324
+ position: fixed;
325
+ top: var(--status-bar-height);
326
+ right: 0;
327
+ width: var(--panel-width);
328
+ height: calc(100vh - var(--status-bar-height));
329
+ background: var(--surface);
330
+ border-left: 1px solid var(--border);
331
+ display: flex;
332
+ flex-direction: column;
333
+ overflow: hidden;
334
+ z-index: 20;
335
+ }
336
+
337
+ #panel-header {
338
+ padding: 16px 20px 12px;
339
+ border-bottom: 1px solid var(--border);
340
+ display: flex;
341
+ align-items: center;
342
+ justify-content: space-between;
343
+ flex-shrink: 0;
344
+ }
345
+
346
+ #panel-title {
347
+ font-size: 12px;
348
+ font-weight: 700;
349
+ letter-spacing: 0.08em;
350
+ text-transform: uppercase;
351
+ color: var(--text-dim);
352
+ }
353
+
354
+ #panel-close {
355
+ background: none;
356
+ border: none;
357
+ color: var(--text-dim);
358
+ cursor: pointer;
359
+ font-size: 18px;
360
+ line-height: 1;
361
+ padding: 0 4px;
362
+ transition: color 0.12s;
363
+ }
364
+ #panel-close:hover { color: var(--text-bright); }
365
+
366
+ #panel-body {
367
+ flex: 1;
368
+ overflow-y: auto;
369
+ padding: 20px;
370
+ }
371
+
372
+ #panel-body::-webkit-scrollbar { width: 4px; }
373
+ #panel-body::-webkit-scrollbar-track { background: transparent; }
374
+ #panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
375
+
376
+ .detail-id {
377
+ font-size: 11px;
378
+ font-weight: 700;
379
+ letter-spacing: 0.08em;
380
+ opacity: 0.6;
381
+ margin-bottom: 6px;
382
+ }
383
+
384
+ .detail-title {
385
+ font-size: 16px;
386
+ font-weight: 600;
387
+ color: var(--text-bright);
388
+ line-height: 1.4;
389
+ margin-bottom: 16px;
390
+ }
391
+
392
+ .detail-badge {
393
+ display: inline-block;
394
+ padding: 3px 12px;
395
+ border-radius: 10px;
396
+ font-size: 11px;
397
+ font-weight: 700;
398
+ letter-spacing: 0.06em;
399
+ text-transform: uppercase;
400
+ margin-bottom: 20px;
401
+ }
402
+
403
+ .detail-section {
404
+ margin-bottom: 20px;
405
+ }
406
+
407
+ .detail-label {
408
+ font-size: 10px;
409
+ font-weight: 700;
410
+ letter-spacing: 0.1em;
411
+ text-transform: uppercase;
412
+ color: var(--text-dim);
413
+ margin-bottom: 6px;
414
+ }
415
+
416
+ .detail-value {
417
+ color: var(--text);
418
+ font-size: 13px;
419
+ line-height: 1.55;
420
+ }
421
+
422
+ .detail-tag-list {
423
+ display: flex;
424
+ flex-wrap: wrap;
425
+ gap: 6px;
426
+ }
427
+
428
+ .detail-tag {
429
+ padding: 3px 10px;
430
+ border-radius: 6px;
431
+ font-size: 11px;
432
+ font-weight: 500;
433
+ background: var(--surface2);
434
+ border: 1px solid var(--border);
435
+ color: var(--text-dim);
436
+ cursor: pointer;
437
+ transition: border-color 0.12s, color 0.12s;
438
+ }
439
+ .detail-tag:hover { border-color: var(--text-dim); color: var(--text); }
440
+
441
+ /* ── Loading & error overlays ── */
442
+ #overlay {
443
+ position: fixed;
444
+ inset: 0;
445
+ background: rgba(14, 14, 18, 0.92);
446
+ display: flex;
447
+ flex-direction: column;
448
+ align-items: center;
449
+ justify-content: center;
450
+ gap: 16px;
451
+ z-index: 100;
452
+ }
453
+ #overlay.hidden { display: none; }
454
+
455
+ .spinner {
456
+ width: 36px;
457
+ height: 36px;
458
+ border: 3px solid var(--border);
459
+ border-top-color: var(--decl-color);
460
+ border-radius: 50%;
461
+ animation: spin 0.7s linear infinite;
462
+ }
463
+
464
+ @keyframes spin { to { transform: rotate(360deg); } }
465
+
466
+ #overlay-message {
467
+ color: var(--text-dim);
468
+ font-size: 14px;
469
+ }
470
+
471
+ #overlay-error {
472
+ color: var(--broken-color);
473
+ font-size: 13px;
474
+ text-align: center;
475
+ max-width: 400px;
476
+ }
477
+
478
+ #overlay-retry {
479
+ display: none;
480
+ background: var(--surface2);
481
+ border: 1px solid var(--border);
482
+ color: var(--text);
483
+ padding: 8px 20px;
484
+ border-radius: 8px;
485
+ cursor: pointer;
486
+ font-size: 13px;
487
+ margin-top: 4px;
488
+ }
489
+ #overlay-retry:hover { border-color: var(--text-dim); }
490
+
491
+ #edges-svg { transition: opacity 0.2s ease; }
492
+
493
+ /* SVG edges */
494
+ .edge {
495
+ fill: none;
496
+ stroke: var(--border);
497
+ stroke-width: 1.5;
498
+ opacity: 0.6;
499
+ transition: opacity 0.3s ease;
500
+ }
501
+ .edge.highlight {
502
+ stroke: var(--text-dim);
503
+ opacity: 1;
504
+ }
505
+ .edge.focus-dim {
506
+ opacity: 0.04;
507
+ }
508
+ #edges-svg {
509
+ transition: opacity 0.18s ease;
510
+ }
511
+
512
+ /* Scrollbar */
513
+ #canvas-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
514
+ #canvas-wrap::-webkit-scrollbar-track { background: transparent; }
515
+ #canvas-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
516
+
517
+ /* ── Focus mode — flex-basis collapse for simultaneous shrink + slide ── */
518
+
519
+ /* Nodes being animated out: flex-basis + margin collapse simultaneously with slide */
520
+ .node.focus-exiting {
521
+ overflow: hidden;
522
+ pointer-events: none;
523
+ /* transition and initial flex-basis set via inline styles in JS */
524
+ }
525
+
526
+ /* Nodes in focus: stay put, get a glow */
527
+ .node.focus-active {
528
+ box-shadow: 0 0 0 2px currentColor, 0 8px 32px rgba(0,0,0,0.6) !important;
529
+ }
530
+
531
+ /* ESC hint */
532
+ #focus-hint {
533
+ position: fixed;
534
+ bottom: 24px;
535
+ left: calc(50% - var(--panel-width) / 2);
536
+ transform: translateX(-50%);
537
+ background: var(--surface2);
538
+ border: 1px solid var(--border);
539
+ color: var(--text-dim);
540
+ padding: 7px 18px;
541
+ border-radius: 20px;
542
+ font-size: 12px;
543
+ pointer-events: none;
544
+ opacity: 0;
545
+ transition: opacity 0.25s ease;
546
+ z-index: 50;
547
+ }
548
+ #focus-hint.visible { opacity: 1; }
549
+ /* ── Activity feed ── */
550
+ #activity-feed {
551
+ position: fixed;
552
+ bottom: 0;
553
+ left: 0;
554
+ right: var(--panel-width);
555
+ height: 36px;
556
+ background: var(--surface);
557
+ border-top: 1px solid var(--border);
558
+ display: flex;
559
+ align-items: center;
560
+ overflow: hidden;
561
+ z-index: 20;
562
+ transition: height 0.2s ease;
563
+ }
564
+ #activity-feed.expanded { height: 180px; align-items: flex-start; }
565
+ #activity-feed.has-events { border-top-color: var(--act-border); }
566
+
567
+ #activity-toggle {
568
+ flex-shrink: 0;
569
+ padding: 0 12px;
570
+ font-size: 10px;
571
+ font-weight: 700;
572
+ letter-spacing: 0.06em;
573
+ color: var(--text-dim);
574
+ cursor: pointer;
575
+ user-select: none;
576
+ display: flex;
577
+ align-items: center;
578
+ gap: 6px;
579
+ height: 36px;
580
+ }
581
+ #activity-toggle:hover { color: var(--text-bright); }
582
+ #activity-pulse {
583
+ width: 6px; height: 6px;
584
+ border-radius: 50%;
585
+ background: var(--act-color);
586
+ opacity: 0;
587
+ transition: opacity 0.3s;
588
+ }
589
+ #activity-pulse.live { opacity: 1; animation: pulse 1.5s ease-in-out infinite; }
590
+ @keyframes pulse {
591
+ 0%, 100% { opacity: 1; }
592
+ 50% { opacity: 0.3; }
593
+ }
594
+
595
+ #activity-list {
596
+ flex: 1;
597
+ overflow-y: auto;
598
+ overflow-x: hidden;
599
+ padding: 0 8px;
600
+ font-size: 11px;
601
+ font-family: monospace;
602
+ display: flex;
603
+ flex-direction: column;
604
+ gap: 0;
605
+ }
606
+ #activity-feed:not(.expanded) #activity-list { flex-direction: row; align-items: center; gap: 16px; overflow: hidden; white-space: nowrap; }
607
+
608
+ .activity-event {
609
+ padding: 4px 0;
610
+ color: var(--text-dim);
611
+ border-bottom: 1px solid var(--surface2);
612
+ display: flex;
613
+ align-items: baseline;
614
+ gap: 8px;
615
+ flex-shrink: 0;
616
+ }
617
+ #activity-feed:not(.expanded) .activity-event { border: none; padding: 0; }
618
+ .activity-event:last-child { border-bottom: none; }
619
+
620
+ .ae-time { opacity: 0.4; font-size: 10px; flex-shrink: 0; }
621
+ .ae-icon { flex-shrink: 0; }
622
+ .ae-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
623
+ .ae-text.agent-start { color: var(--act-color); font-weight: 600; }
624
+ .ae-text.agent-done { color: var(--mile-color); }
625
+ .ae-text.bash { color: var(--text-dim); }
626
+ .ae-text.write { color: var(--decl-color); }
627
+
628
+ </style>
629
+ </head>
630
+ <body>
631
+
632
+ <!-- Status bar -->
633
+ <div id="status-bar">
634
+ <span class="project-name" id="project-name">Declare</span>
635
+ <span class="stat-group"><span class="value" id="stat-decls">–</span> Declarations</span>
636
+ <span class="stat-group"><span class="value" id="stat-miles">–</span> Milestones</span>
637
+ <span class="stat-group"><span class="value" id="stat-acts">–</span> Actions</span>
638
+ <span id="health-badge" class="health-badge health-unknown">–</span>
639
+ <span class="spacer"></span>
640
+ <span id="last-updated"></span>
641
+ <button id="refresh-btn">Refresh</button>
642
+ </div>
643
+
644
+ <!-- Main -->
645
+ <div id="main">
646
+ <div id="canvas-wrap">
647
+ <div id="canvas-container">
648
+ <svg id="edges-svg"></svg>
649
+ <div class="layer-section" id="layer-declarations">
650
+ <div class="layer-label">Declarations</div>
651
+ <div class="layer" id="nodes-declarations"></div>
652
+ </div>
653
+ <div class="layer-section" id="layer-milestones">
654
+ <div class="layer-label">Milestones</div>
655
+ <div class="layer" id="nodes-milestones"></div>
656
+ </div>
657
+ <div class="layer-section" id="layer-actions">
658
+ <div class="layer-label">Actions</div>
659
+ <div class="layer" id="nodes-actions"></div>
660
+ </div>
661
+ </div>
662
+ </div>
663
+ </div>
664
+
665
+ <!-- Side panel — always visible fixed right column -->
666
+ <div id="side-panel">
667
+ <div id="panel-header">
668
+ <span id="panel-title">Details</span>
669
+ </div>
670
+ <div id="panel-body">
671
+ <div id="panel-empty" style="color:var(--text-dim);font-size:12px;padding:8px 0;line-height:1.7">
672
+ Click any node to see details.<br>
673
+ Click a declaration or milestone<br>to focus its subtree.
674
+ </div>
675
+ </div>
676
+ </div>
677
+
678
+ <!-- Activity feed — live agent/tool event stream -->
679
+ <div id="activity-feed">
680
+ <div id="activity-toggle">
681
+ <div id="activity-pulse"></div>
682
+ <span id="activity-label">ACTIVITY</span>
683
+ </div>
684
+ <div id="activity-list">
685
+ <span style="color:var(--text-dim);font-size:10px;opacity:0.4">No activity yet — agents will appear here when running</span>
686
+ </div>
687
+ </div>
688
+
689
+ <!-- Loading/error overlay -->
690
+ <div id="overlay">
691
+ <div class="spinner"></div>
692
+ <div id="overlay-message">Loading graph…</div>
693
+ <div id="overlay-error"></div>
694
+ <button id="overlay-retry">Retry</button>
695
+ </div>
696
+
697
+ <div id="focus-hint">Press Esc or click outside to exit focus</div>
698
+ <script src="/public/app.js"></script>
699
+ </body>
700
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declare-cc",
3
- "version": "0.4.3",
3
+ "version": "0.4.8",
4
4
  "description": "A future-driven meta-prompting engine for agentic development, rooted in declared futures and causal graph structure.",
5
5
  "bin": {
6
6
  "declare-cc": "bin/install.js"